Search code examples
csscross-browser

Which css hacks for IE 6 and 7 are future proof?


Which css hacks for IE 6 and 7 are future proof? i mean if i use then then they would never create any problem and their patch will never be implemented?

manage 2 css one for all and one for IE is time consuming and it adds one extra style sheet also. and if any hack can solve problem within main css then it's a timesaver and when multiple people work on same project then most of time we forgot to make change in conditional css too.

i'm not asking about condition stylesheet


Solution

  • none.
    Use IE conditional comments to insert your per-version (no pun intended .. well maybe a little) styles..


    [update]
    Additional notes to your altered question. It might be time consuming but it is the best-practice (btw many of the hacks are not valid css)..

    Using hacks can never be guaranteed, even for the same major versions of a browser .. It is unlikely that they will fix a css bug in IE6 in future minor releases, but still you can not be 100% certain..

    There is an alternative (perhaps more time consuming at first), the IE comments i mentioned, but it is truly the best practice...

    Besides, think about the other coders in your team who all must know, understand and remember in the future the same hacks.. Over time it will become more time consuming to maintain the hacks than to maintain distinct versions of the offending rules in other files..