|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello,
I have a header as follows: <h2>Manager <span class=""Orange"">*</span>"</h2> ..Orange {color: orange;} Is there another way to place a orange * on the right of a header? And should I do it this way? If I could create this only with CSS then it might be easier to change it if I need it. Thank You, Miguel |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
shapper wrote:
> Hello, > > I have a header as follows: > > <h2>Manager <span class=""Orange"">*</span>"</h2> > > .Orange {color: orange;} > > Is there another way to place a orange * on the right of a header? And > should I do it this way? > > If I could create this only with CSS then it might be easier to change > it if I need it. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <meta http-equiv="content-language" content="en-us"> <title>:after pseudo elements</title> <style type="text/css"> h2.special:after { content: "*"; } </style> </head> <body> <p>Standard caveats with IE's limited CSS support</p> <h2>Normal Heading</h2> <h2 class="special">Special Heading</h2> </body> </html> -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
shapper wrote:
> I have a header as follows: > > <h2>Manager <span class=""Orange"">*</span>"</h2> I would remove the extra quotemarks, which will probably cause failure. > .Orange {color: orange;} What will you do next week when the client says, "Make them green." ..Orange {color: green;} ?? Your code will look funny with an orange 'class' and a green asterisk. > Is there another way to place a orange * on the right of a header? And > should I do it this way? I would probably do it this way, except ... > If I could create this only with CSS then it might be easier to > change it if I need it. ...I would not use "Orange" as the class name. Pick something that describes the event. ..hdrstar { color: orange; background-color: transparent; } <h2>Manager <span class="hdrstar">*</span></h2> I'd recommend using all lower-case as well. -- -bts -Friends don't let friends drive Vista |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Beauregard T. Shagnasty wrote:
>>.Orange {color: orange;} > > What will you do next week when the client says, "Make them green." > > .Orange {color: green;} ?? > > Your code will look funny with an orange 'class' and a green asterisk. I'm sure he meant the fruit. They are indeed green when not ripe. And that doesn't look funny. - Daniel |
|
![]() |
| Outils de la discussion | |
|
|