Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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 -->
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


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.