IE CSS Hacks

Internet Explorer.

It doesn't matter if it's IE 6, IE 7 or IE 8, they all suck.
Even though IE 8 has made some progress concerning CSS issue, IE 7 and obviously IE 6 are the worst browsers.

With CSS compatibility issues from here to Bill's office it takes too much work to make one CSS file fit all. That's why I thought of a small hack that I make in every HTML / XSLT / ASPX document I'm working with.

at the body tag of each page I insert a small html if:

<!--[if IE 6]>
<body class="ie6">
<![endif]-->

<!--[if IE 7]>
<body class="ie7">
<![endif]-->

<!--[if IE 8]>
<body class="ie8">
<![endif]-->

After placing that, you can easily create inside your general CSS file an inherited styling such as:
body
    { margin: 0 0 0 0; }
body.ie6
    { margin: 0 5px 0 0; }
body.ie7
    { margin: 0 0 5px 0; }
body.ie8
    { margin: 0 0 0 5px; }


This is the easiest way for me to work with IE 6 and IE 7 (and sometimes IE 8).  There is another way to make style compatible with IE browsers which involves creating different CSS file for every IE:


<link rel="stylesheet" type="text/css" href="general.css" />

<!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="generalIE6.css" />
<![endif]-->

<!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="generalIE7.css" />
<![endif]-->

<!--[if IE 8]>
    <link rel="stylesheet" type="text/css" href="generalIE8.css" />
<![endif]-->


Good luck, and hopefully we won’t need any CSS hacks for Internet Explorer 9,
Elad Shalom,
CTO at ITweetLive.com

Comments

  1. Download All Recent Games , Movies And Apps For
    Free at http://estrip.co.kr/entry/201210251312?
    category=0

    You can download from the following categories

    Applications (RSS)
    Android (RSS)
    iOS (RSS)
    MAC (RSS)
    Windows (RSS)
    Ebooks (RSS)
    eBook (RSS)
    Magazines (RSS)
    Games (RSS)
    Linux (RSS)
    MAC (RSS)
    PC (RSS)
    PS3 (RSS)
    PSP (RSS)
    Wii (RSS)
    XBOX360 (RSS)
    Movies (RSS)
    BDRiP (RSS)
    Cam (RSS)
    DVDRiP (RSS)
    DVDRiP Old (RSS)
    DVDSCR (RSS)
    HDRiP (RSS)
    R5 (RSS)
    RC (RSS)
    SCR (RSS)
    Staff Picks (RSS)
    Telecine (RSS)
    Telesync (RSS)
    Workprint (RSS)
    Music (RSS)
    Albums (RSS)
    iTunes (RSS)
    MViD (RSS)
    Singles/EPs (RSS)
    Staff Picks (RSS

    Download everything for free at http://estrip.
    co.kr/entry/201210251312?category=0

    ReplyDelete
  2. Fabulous, what a website it is! This weblog provides valuable facts to us, keep
    it up.

    Look into my weblog :: minecraft download

    ReplyDelete
  3. Hi! I could have sworn I've been to this website before but after browsing through a few of the posts I realized it's new to me.

    Anyways, I'm definitely delighted I discovered it and I'll be bookmarking it and checking back
    frequently!

    Here is my weblog - dragonvale hints and cheats **

    ReplyDelete
  4. Having read this I thought it was rather informative.

    I appreciate you taking the time and effort to put this short article together.
    I once again find myself spending a lot of time both reading and posting comments.

    But so what, it was still worth it!

    My web blog :: play minecraft for free

    ReplyDelete
  5. Its not my first time to go to see this web page, i am browsing this
    web site dailly and get good facts from here everyday.



    Look at my website castleville secrets

    ReplyDelete
  6. Eco-Drive pieces own knobs that will be rolex replica sale, whilst these are similar to typical see knobs. All brightness, quite possibly house brightness, tickets from your dial suitable solar energy receptor. Ability is certainly filed from a chargeable titanium lithium-ion electric, so that the see doesn’t will need persistent contact with brightness. Wholly energized, Citizen iwc replica watches. electric by just Eco-Drive could go for a couple of calendar months not having contact with brightness. Which means that whenever quartz pieces are definitely stronger, even more complete together with much less expensive compared with semi-automatic or fully automatic pieces, so why will someone shop for semi-automatic or fully automatic pieces? Gerd-R Lang, a good French fake rolex what person scalps Chronoswiss, coined a good saying meant for this provider the fact that encapsulates some of our selling point that will semi-automatic or fully automatic pieces: "Faszination der Mechanik", pretty translated as the fascination with details mechanized, notably micro-mechanics. Semi-automatic or fully automatic pieces happen to be mechanized pieces, electric by just a spring and coil which unfortunately anytime wound up, passes across ability, via the unsafe effects of instrument, that will a number of gears which unfortunately in due course transform any control which unfortunately indicate the amount of time over the dial within the see. It is actually an absolutely unique little bit of equipment, regularly using a lot of fake rolex miniature sections. The idea semi-automatic or fully automatic may well be mistakenly useful to refer to most of mechanized fake rolex, even so it should be the easiest types of mechanized see. It is actually identified as semi-automatic or fully automatic, since the device is certainly self-winding.

    ReplyDelete

Post a Comment

Popular posts from this blog

Cloud Computing Advantages and Disadvantages

Linked Files in Visual Studio 2010

BDD, TDD, and Everything Between