Jump to content

How to support IE6 and 7 in one CSS?


Kane250

Recommended Posts

Hi,

 

I recently posted in here looking for ways to fix my site for IE6, which I spent a lot of time learning and have completely fixed with re-coding and using many !important tags.

 

I have come to find out now that IE7 completely trashes my site again. I cannot change the !important tags because they are needed for IE6, and I cannot change my regular CSS because it changes how things render in firefox and other decent browsers...

 

How are other people achieving this? Do I need a seperate CSS just for IE7? If so, how do I implement that to the site?

 

Thanks for any help. Internet Explorer is ruining my life.

Link to comment
Share on other sites

This is usually the order in which I code cross-browser compliant sites. It works really well for me:

 

1) Code the site in Firefox. I try to be careful with my use of paddings (I try to use them as little as possible), which often saves me from having to make too many changes for IE7 at least.

2) Adjust for IE (all). I create a conditional comment that affects all IEs (I don't limit it to any version). I then make all the necessary adjustments in that sheet alone to fix IE7.

3) Adjust for IE6. I create a conditional comment that affects anything less than IE7 (even though I don't test for IE 5.5, or even look at it, I figure that anything that fixes IE6 may possibly fix something lower, which is why I create this conditional comment for anything less than IE7). I then add all the CSS to fix IE6.

 

This method usually ensures I don't have to spend a lot of time doing cross-browser testing. 99.9% of the time I don't have to do anything for Safari and it works fine. In this way I support IE 6 and 7, FF3, and Safari 3.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.