Hello All I have this code in my style sheet a.whybuy:link { font-size:13px; font-weight:bold; color:#09c; font-family:trebuchet ms,verdana,sans-serif; text-decoration:none; text-transform:uppercase;} a.whybuy:visited { font-size:13px; font-weight:bold; color:#09c; font-family:trebuchet ms,verdana,sans-serif; text-decoration:none; text-transform:uppercase;} a.whybuy:active { font-size:13px; font-weight:bold; color:#f90; font-family:trebuchet ms,verdana,sans-serif; text-decoration:none; text-transform:uppercase;} a.whybuy:hover { font-size:13px; font-family:trebuchet ms,verdana,sans-serif; font-weight:bold; color:#0bf; text-decoration:none; text-transform:uppercase;} Whats weird is the link code works fine but when I mouse over the only thing that its pulling from the hover style is the uppercase. But the font goes small and black. Any ideas are appreciated!
Wow, that's made of /FAIL/ - here's a tip: if you are setting all the states, you only need to set them ONCE not every malfing time. Values with spaces in them should be in quotes "trebuchet ms"... and without seeing the HTML this is being applied to, or the complete style sheet to see if anything is being accidentally overridden elsewhere, we're only seeing a fraction of the picture. Again, brain surgury across the telegraph in 1880. Still, the "trebuchet ms" declaration without the quotes could be your cuplrit. In either case the following is functionally identical: .whybuy { text-decoration:none; text-transform:uppercase; font:bold 13px/15px "trebuchet ms",verdana,sans-serif; color:#09C; } .whybuy:active { color:#F90; } .whybuy:hover { color:#0BF; } Code (markup): You only need to state them once, not on every psuedoclass - set it once, then on psuedoclasses only set what changes! Oh, and being that :active and :focus are basically on anchors the keyboard equivalent to :hover (yes, I realize :focus does a hair more than that) I would probably set all three to the same value: .whybuy:active, .whybuy:focus, .whybuy:hover { color:#0BF; } Code (markup): Oh, and hex is supposed to be uppercase, not lower (ok, that's a nitpick since browsers don't care)
It is? Why? Even my graphics programs don't seem to have a preference in stating them. I've been doing everything in lower case all this time because that's my default-- should I be going to uppercase for colours? *edit oh, cause a != A duh. But then browsers aren't the only things that accept a=A...
actually, because lowercase implies base64, not hexadecimal. Base64 uses the full range of uppercase, full range of lower case, 0..9, in that order for the first 62 values, followed by + and - in some implementations (MIME), [] in others (ircU) or even * and - (URL applications)
Browsers don't care because numeric character references are case insensitive. To spread incorrect information as fact causes everyone, especially those just learning, considerable harm. Please check your sources before making such fabulous statements. cheers, gary
Correct. It's just annoying after 30 years of writing code to suddenly start seeing it in lower case after it being universally accepted in every other type of programming that hex is upper case - going all the way back to hand coding assembly. read deeper before making inflamatory statements. Nowhere did I say it didn't work or that HTML says it shouldn't - I'm just saying it's bad practice inconsistant with the past THREE DECADES of computing, and could be mistaken by a human reading the code for another encoding type. (every time I see it I think base64) A little consistancy is all I'm asking for - See why I hate the "new style" of indentation (ok, it's about a decade old now) with the ****tarded don't de-indent the close and put the open on it's own line - WTF? That's supposed to make it BETTER?!?
and responding to Sp's you said: Both statements are false. If you want to state your own coding preferences, that's one thing. To state those preferences as fact is your error. As to your long programming experience, that may play big time with the PFYs, but it gets old to those of us who were punching binary machine instructions into cards in the early 60s. gary