Html Comment Breaks IE7 CSS

Discussion in 'HTML & Website Design' started by tin2mon, Oct 10, 2010.

  1. #1
    First... this is a markup issue not a CSS issue, so please don't yell for not posting in the CSS forum... it doesn't belong there

    Today while using the CSS adjacent sibling selector I noticed it wasn't working in IE... the confusing thing was I've used it before in IE and it works fine. When I tracked down the problem I realized it had to do with a comment between two of the elements.

    Has anyone else ever seen a markup bug like this in IE7 before... I hate marking stuff up for IE, but this is RIDICULOUS!

    If you delete the comment in the following markup then the styles are applied correctly.
    Is this a known problem?

    I've also found that this bug has nothing to do with conditional comments for IE, even CC's that eval to false for the browser break this style
     
    tin2mon, Oct 10, 2010 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    drhowarddrfine, Oct 10, 2010 IP