Re: Web Control vs CSS
From: Paul (dotPaul_at_paulNOSPAMMERleblanc.net)
Date: 03/21/04
- Next message: Jim Heavey: "Text Box Alignment"
- Previous message: Polaris: "Re: Is HTTP Stateless ?"
- In reply to: Hai Nguyen: "Web Control vs CSS"
- Next in thread: Bill Borg: "Re: Web Control vs CSS"
- Reply: Bill Borg: "Re: Web Control vs CSS"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 21 Mar 2004 11:18:04 -0800
Hai,
You certaily can use CSS. In the Solution Explorer for your button (or
other control) locate the CssClass property. You can type the name of
the class in there. Here's an example:
1. Create a text file named myCSSStyles.css and put it in the
application root folder.
2. Open it with the IDE (in Solution Explorer you can locate it in the
root if click the icon to Show All Files in the title bar of the
Solution Explorer.)
3. Type: .btnClass {
font-family: arial;
font-weight: bold;
color:white;
background-color: maroon;
}
4. Save it. "btnClass" could also be anything you like such as
"buttons" or "btnStyle". Doesn't really matter.
5. Type "btnClass" in the CssClass property of the button. Don't use
the . when you refer to it here. It knows how to find "btnClass" by
looking at all the classes in the CSS file that begin with the dot.
Sometimes the CSS will apply immediately in Design View, but sometimes
not. I have no idea why. BUt if you run the form it should have a
button with all the above attributes. Good luck! CSS is the way to go.
~Paul
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: Jim Heavey: "Text Box Alignment"
- Previous message: Polaris: "Re: Is HTTP Stateless ?"
- In reply to: Hai Nguyen: "Web Control vs CSS"
- Next in thread: Bill Borg: "Re: Web Control vs CSS"
- Reply: Bill Borg: "Re: Web Control vs CSS"
- Messages sorted by: [ date ] [ thread ]