Goofy Text

Discussion in 'CSS' started by GrassR00ts, Aug 20, 2008.

  1. #1
    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!
     
    GrassR00ts, Aug 20, 2008 IP
  2. cont911

    cont911 Peon

    Messages:
    50
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    have checked it in IE6/FF/Opera and could not repeat the issue.
    Everything works fine
     
    cont911, Aug 20, 2008 IP
  3. GrassR00ts

    GrassR00ts Active Member

    Messages:
    614
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Hummm

    Alright its got to be pulling somethign from somewhere else on my site

    Thanks!
     
    GrassR00ts, Aug 20, 2008 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    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)
     
    deathshadow, Aug 20, 2008 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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...
     
    Stomme poes, Aug 22, 2008 IP
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #6
    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)
     
    deathshadow, Aug 22, 2008 IP
  7. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #7
    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
     
    kk5st, Aug 22, 2008 IP
  8. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #8
    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?!?
     
    deathshadow, Aug 22, 2008 IP
  9. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #9
    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
     
    kk5st, Aug 22, 2008 IP