DrDoc

msg:1195248 | 9:52 pm on Apr 10, 2003 (gmt 0) |
Works *:first-letter { color: #00f; } <form> <label for="name" accesskey="n">name</label> <input type="text" id="name" tabindex="1"> </form>
Does not work label:first-letter { color: #00f; } <form> <label for="name" accesskey="n">name</label> <input type="text" id="name" tabindex="1"> </form>
Works .lbl:first-letter { color: #00f; } <form> <label class="lbl" for="name" accesskey="n">name</label> <input type="text" id="name" tabindex="1"> </form>
|
griz_fan

msg:1195249 | 10:14 pm on Apr 10, 2003 (gmt 0) |
Thanks for the tip, DrDoc. I tried hanging a class on the label tag like you suggested, but with no luck. I think I've been looking at this so long, I might be overlooking an obvious mistake. Here's the code I've been working with: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled</title> <style type="text/css"> .lbl:first-letter { color: #00f; } </style> </head> <body> <form> <label class="lbl" for="name" accesskey="n">name</label> <input type="text" id="name" tabindex="1"> </form> </body> </html> If you (or anyone else) sees a problem, I'd really apreciate the help. Thanks again!
|
DrDoc

msg:1195250 | 10:36 pm on Apr 10, 2003 (gmt 0) |
Seems like I was wrong in my earlier post. I can't possibly recreate what I did... However, I should only work for block-level elements: [w3.org...] | The :first-line pseudo-element can only be attached to a block-level element. |
|
|
DrDoc

msg:1195251 | 10:36 pm on Apr 10, 2003 (gmt 0) |
label { display: block; float: left; } label:first-letter { color: #00f; }
|
DrDoc

msg:1195252 | 10:38 pm on Apr 10, 2003 (gmt 0) |
*:first-letter { color: #00f; } ...works no matter if label is block-level or not. (At least in IE)
|
griz_fan

msg:1195253 | 2:42 pm on Apr 11, 2003 (gmt 0) |
DrDoc, Thanks! Setting the display for label to block did the trick.
|
|