Grow your CSS skills. Land your dream job.

Line breaks inserted after every hyperlink, only in IE 7/8

  • # December 4, 2012 at 1:51 pm

    I just took my site live (www.houserepublicans.wa.gov) and it is bumping every single tag to a new line. But only in IE 7 and 8. It looks fine in IE 9, Chrome, Safarai and Firefox. This is throughout the site, with nested in various other elements. I have tried adjusting line-height, which helps the lines from overlapping, but still bumps every tag to the next line. I have also tried display:inline, to which nothing changed at all. I have searched for every single style applied to in my stylesheet that does not play nice with IE 7/8. Still nothing. I am completely frustrated…and would appreciate any help people can provide!!

    # December 4, 2012 at 1:57 pm

    @hrcwebmaster

    You have this CSS code in a conditional IE 6/7/8 statement above the head tag, could this be your problem?

    # December 4, 2012 at 1:59 pm

    Ok someone else helped me figure it out. I added display:inline !important; to my a in my stylesheet and now it displays fine.

    # December 4, 2012 at 1:59 pm

    Ahh, good good. Glad you found it.

    Don’t forget to mark this case as solved :)

    # December 4, 2012 at 2:01 pm

    Thanks @Watson90, I did try adjusting that with no luck. As you can see above I got it figured out. Thank you for your time!

    # December 4, 2012 at 2:01 pm

    Thank you, I marked it as solved now.

    # December 4, 2012 at 2:11 pm

    @hrcwebmaster, that is not the proper solution to the problem.

    The cause of the problem is that you’re not closing your tags properly. Your HEADER is never closed, and neither is your H1 or your #main. While most browsers fix this issue automatically (incorrectly in my opinion), IE7/8 doesn’t and shows things properly, as they are actually coded.

    I’d strongly recommend to comb through your code and make sure all tags are properly closed.

    # December 20, 2012 at 6:11 pm

    Hmm the site is created with templates from a theme, so it wasn’t up to me to close tags. But I just double checked my source code and I see as closed?

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".