Leave it to Internet Explorer

Discussion in 'Web Design and Development' started by dpaanlka, Oct 28, 2006.

  1. dpaanlka macrumors 601


    Nov 16, 2004
    Of course my site looks fine in every browser but Internet Explorer, including IE 7.

    Now, can anybody tell me why this page is stretched to 100% width in IE, and this one isn't, even though they're generated from the same PHP??? It's supposed to be only 600 pixels wide (to match the top banner).
  2. ddekker macrumors regular

    Sep 23, 2006

    I'm not on a pc now, but I have heard multiple times that there is a simple line of code that you put at in your page that detects IE7 and loads a little line of css to make things right.. I heard Leo Laporte talk about it on a couple of his podcasts... I would think a little google would fix ya right up.. and be it that IE screws it up and it makes ya mad, you still have to code to it... right or wrong its the majority

  3. dpaanlka thread starter macrumors 601


    Nov 16, 2004
    well i guess i'll a have to put off solving this problem for now, since dreamhost just now randomly decided my forums don't need to be working at all
  4. ThunderLounge macrumors 6502


    Sep 20, 2006
    Yes. They are called conditional comments.


    The premise of them, is that every browser except IE sees them as regular html comments.

    So, you take lets say... a stylesheet import, and wrap it inside one of the conditional comments.

    On the site listed above, there's a list for checking for all kinds of IE versions.

    GTE: greater than or equal to
    LTE: less than or equal to


    Let's say you need to add a little javascript for IE 5.5+...

    <!--[if gte IE 5.5]>
         stick in your js tag/function for IE 5.5 and up.
    You can have as many as necessary, wherever necessary.

    Need an extra clearing div only in IE? Add it where you need it, and wrap it in a CC.

    It's pretty simple to use, and allows your page to still validate as well as your css files too.

    No need for star hack, holly hack, or anything of the sort in your css files.

    Just take what you would need to hack, and stick it in a new stylesheet like any other class. Just make sure your main stylesheet is called first. ;)

    Granted it's still ugly, and it would be nice if IE just freakin worked. But, at least it's somewhat easier to keep track of the tweaks you have to make. :D
  5. dpaanlka thread starter macrumors 601


    Nov 16, 2004
    My site is non-CSS. This is so it can display correctly in non-CSS browsers for System 7.

Share This Page