Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

So I'm working on this website for my dad (http://tendonaid.com/) and it works nice in modern browsers, but apparently he's getting comments on how the top navigation doesn't work on Internet Explorer (7 and lower, I think). It's shifts to the right instead of centering in the middle.

My question is, how do I fix this? Or, is there some sort of if/or conditional comment thing I can do that says IF IE... use this class for the div / OR (any other browser) use this other class?

share|improve this question

1 Answer 1

You can use conditional comments to target specific versions of Internet Explorer. In your case you would want to target IE7 and lower so you would use:

<!--[if lt IE 7 ]>
  <style type="text/css">
    <!-- Your special rule to fix the CSS issue goes here -->
  </style>
<![endif]-->
share|improve this answer
    
@Maddy "IE use this class for the div … any other browser use other class" They will still use the same class, but the definitions differ. The CSS for IE7 should be included after your 'normal' style sheet and should overwrite the desired classes. –  feeela Jul 22 '11 at 8:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.