Line break in anchor tags

Discussion in 'CSS' started by dreamstarstudios, Sep 4, 2008.

  1. #1
    I am having a problem where for some unknown reason, anchor tags are inserting a line break and an unusual whitespace below the link:

    http://www.dreamstarstudios.net/index2.htm

    The problem can be seen in the right floating div.

    I would post my CSS but there is actually no universal OR specific styling being applied to the anchor tags. And the problem is universal in other anchor tags.

    The problem can be seen in Firefox3 (not sure about FF2) but appears normal ie7.

    Thanks!
    Brian
     
    dreamstarstudios, Sep 4, 2008 IP
  2. Colleen

    Colleen Illustrious Member

    Messages:
    6,777
    Likes Received:
    725
    Best Answers:
    1
    Trophy Points:
    430
    #2
    I am assuming you got this fixed as I don't see the problem, if not, let me know.
     
    Colleen, Sep 4, 2008 IP
  3. dreamstarstudios

    dreamstarstudios Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Actually. It is still displaying wrong for me in FF3. For some reason when I check on browsershots.org however, it renders correctly. I really don't know what to make of it. :(
     
    dreamstarstudios, Sep 4, 2008 IP
  4. Colleen

    Colleen Illustrious Member

    Messages:
    6,777
    Likes Received:
    725
    Best Answers:
    1
    Trophy Points:
    430
    #4
    Ok, I am using FF3 as well, could you possibly take a screenshot so I can see what it's doing? Maybe it is doing it but just looks normal to me...
     
    Colleen, Sep 4, 2008 IP
  5. dreamstarstudios

    dreamstarstudios Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    [​IMG]

    So it's the extra space below the red circled text. In addition it should appear inline (I didn't insert any break so I don't know why the text breaks).
     
    dreamstarstudios, Sep 4, 2008 IP
  6. Colleen

    Colleen Illustrious Member

    Messages:
    6,777
    Likes Received:
    725
    Best Answers:
    1
    Trophy Points:
    430
    #6
    Wow, that's definitely odd, it's not happening here. Sorry, I don't know what to say.
     
    Colleen, Sep 4, 2008 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #7
    I'm seeing it in opera... Let's dig

    Three validation errors - deprecated language attribute/lack of type - so nothing that should effect the actual parsing of the page or the layout.

    Aha, I see it. #main_nav li a in your style.css is setting it to display:block - I think you screwed up this line:

    #main_nav li a, a:visited, a:active, a:focus {

    because the visited, active and focus psuedos would be effecting ALL links, not just #main_nav li...

    If you wanted to set those just for #main_nav LI that should read:

    #main_nav li a,
    #main_nav li a:visited,
    #main_nav li a:active,
    #main_nav li a:focus {

    NOT that you need to state those psuedos because just this:
    #main_nav li a {

    Would trap them. The parent automatically set's it's child pseudoclasses. In either case, once you have visted or select it with the keyboard it's getting set to display:block by that declaration.

    Also explains why colleen didn't see it, she didn't follow the link or navigate to it with the keyboard. (you do know that 90% of the time :active and :focus should be declared the same as :hover, right?). First thing I did was navigate to the offending link in Opera with the keyboard.
     
    deathshadow, Sep 4, 2008 IP
    Colleen likes this.
  8. Colleen

    Colleen Illustrious Member

    Messages:
    6,777
    Likes Received:
    725
    Best Answers:
    1
    Trophy Points:
    430
    #8
    Ok, I do see it now when I click the link, I had that same problem in the past.

    Good catch deathshadow! :)
     
    Colleen, Sep 4, 2008 IP
  9. coolchintan4u

    coolchintan4u Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    The site has amazing look.

    Great work dude !
     
    coolchintan4u, Sep 4, 2008 IP
  10. dreamstarstudios

    dreamstarstudios Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    @ DeathShadow: Thanks SOO much! You got it.
    @ Coolchintan4u: Really appreciate your encouragement especially considering I can't stand the layout because I'm too stuck dreaming up the layout I'm going to begin working on soon. Unfortunately I'm going to need to post photos for sale on the site this weekend so I have no way to get the new layout done in time.

    Thanks again to everyone!
     
    dreamstarstudios, Sep 5, 2008 IP