-
February 16th, 2007, 03:30 AM
#1
[RESOLVED] Assigning a stylesheet
HI Guys,
I've a Stylesheet in my webproject. I have assigned the stylesheet to my default page using <link...>. In the stylesheet I have several styles defined. I have a default one for a button for example and other custom ones. How do I assign a custom from my stylesheet against a particular button.
i.e. I have 6 buttons 5 use the default style, but I want the 6th to have a different style.
Thanks
Last edited by Bill Crawley; February 16th, 2007 at 04:27 AM.
Reason: narrow question
If you find my answers helpful, dont forget to rate me
-
February 16th, 2007, 04:36 AM
#2
Re: Assigning a stylesheet
The Button has a CssClass property - put the class name from the css in there.
HTH,
T
Some cause happiness wherever they go; others, whenever they go.
-
February 16th, 2007, 07:22 AM
#3
Re: Assigning a stylesheet
Hi Toot,
I've just tried that, but it makes no difference. I think a CssClass has to actually be written in code as opposed to using a stylesheet to set that property. i.e. Where the style is declared in the <Head> section of the page.
Code:
<head>
<style>
.CssStyle1
{
font: 12pt verdana;
font-weight:700;
color:orange;
}
.CssStyle2
{
font: 15pt times;
font-weight:250;
color:blue;
}
</style>
If you find my answers helpful, dont forget to rate me
-
February 16th, 2007, 07:26 AM
#4
Re: Assigning a stylesheet
Apologies Toot, you are correct. I was referencing it incorrectly.
If you find my answers helpful, dont forget to rate me
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|