1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

'if IE 6' to work for all versions

Discussion in 'Web Design' started by iliketurtles, Aug 21, 2010.

  1. iliketurtles

    iliketurtles Regular Member

    Joined:
    Dec 10, 2008
    Messages:
    283
    Likes Received:
    10
    Home Page:
    I hate IE so bad.....

    Off course this 11th plague of Egypt does something to the images on my site so they are not showed properly. Someone told me it might work if I changed 'if IE 6' to 'if IE', but how and where do I do that?
     
  2. iliketurtles

    iliketurtles Regular Member

    Joined:
    Dec 10, 2008
    Messages:
    283
    Likes Received:
    10
    Home Page:
    I changed the code in the header, from <!--[if lte IE 6]> to <p><!--[if IE]> and nothing happened.

    Suggestions?
     
  3. disaffected

    disaffected Junior Member

    Joined:
    Nov 9, 2008
    Messages:
    137
    Likes Received:
    47
    If it is just a few css changes you can use the '_' hack for ie6 or '*' hack for ie6/7
     
  4. iliketurtles

    iliketurtles Regular Member

    Joined:
    Dec 10, 2008
    Messages:
    283
    Likes Received:
    10
    Home Page:
  5. origin

    origin Regular Member

    Joined:
    Nov 11, 2008
    Messages:
    334
    Likes Received:
    90
    Home Page:
    Make sure your css inside <!--[if lte IE 6]> is working correctly.
     
  6. iliketurtles

    iliketurtles Regular Member

    Joined:
    Dec 10, 2008
    Messages:
    283
    Likes Received:
    10
    Home Page:
    How do I do that?
     
  7. Nickehyz

    Nickehyz Registered Member

    Joined:
    Feb 25, 2009
    Messages:
    81
    Likes Received:
    4
    Location:
    USA
    Looking it over with a quick glance, it is not the images that are being mashed, it is the tables' width that is being changed in IE.
     
  8. iliketurtles

    iliketurtles Regular Member

    Joined:
    Dec 10, 2008
    Messages:
    283
    Likes Received:
    10
    Home Page:
    How did you find out that?
     
  9. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    Have you included a transitional/loose doctype at the top? If you haven't got a Doctype, IE will definitely not do anything you do not want it to do.

    Stick this before your "<html>" tag:
    HTML:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    However, you can just target IE rather than a specific version, for example:
    HTML:
    <!--[if IE]>
    you css goes here
    <[endif]-->
    Hope that helps!
    Lynn.
     
  10. iliketurtles

    iliketurtles Regular Member

    Joined:
    Dec 10, 2008
    Messages:
    283
    Likes Received:
    10
    Home Page:
    I`ll try that, Lynn, thank you.

    But where do I find the "<html>" tag? Haha I feel dumb asking this, but I can`t help it, I use Wordpress.. :p
     
  11. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    I just see you've posted your site up ... and I had a quick look!

    I can't see anything that's wrong with it? Am I missing something? Either way, you have your doctype set to strict ... which isn't always good, so change it to the one above may help...

    I'm using Google Chrome so I guess the problems is just with IE? If it is, implement the "of IE" tags and definitely change your doctype.

    :D
     
  12. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    If you're using WordPress you're going to have to edit the actual Template you're using...

    If you can direct me to the template you're using, I'll be able to change the doctype for you... but, the doctype will need to go above the <html> which is the VERY beginning of the coding of the website.

    For example, if you go to google.com and press ctrl+u ... you'll see Google's source code, and the first line is a doctype which is then followed by <html>

    Hope that makes sense,
    Lynn. :)

     
  13. iliketurtles

    iliketurtles Regular Member

    Joined:
    Dec 10, 2008
    Messages:
    283
    Likes Received:
    10
    Home Page:
  14. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    I'll have a look for you.

    As for your original question: "'if IE 6' to work for all versions", you'd use <!--[if IE]> your CSS goes here <[endif]-->
     
  15. iliketurtles

    iliketurtles Regular Member

    Joined:
    Dec 10, 2008
    Messages:
    283
    Likes Received:
    10
    Home Page:
    I edited the ie6.css, putting in the <!--[if IE]> your CSS goes here <[endif]-->.

    Stille the same though. Perhaps I did it wrong.

    Looks like this:

    <!--[if IE]>

    /* png fix */

    * html .png {
    azimuth: expression(
    this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
    this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')",
    this.src = "http://www.blackhatworld.com/blackhat-seo/images/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
    this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')",
    this.runtimeStyle.backgroundImage = "none")),this.pngSet=true
    );
    }

    .png a {
    cursor: pointer;
    }

    /* IE6 min- & max-width emulation */

    #header .headerwrap,
    #page,
    #footer {
    width: expression((document.documentElement.clientWidth || document.body.clientWidth) < 1000 ? '990px' : '100%');
    width: expression((document.documentElement.clientWidth || document.body.clientWidth) > 1410 ? '1400px' : '100%');
    }

    <[endif]-->


    Edit: with smilies n all.. haha
     
  16. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    To change the doctype, open up the file "header.php" and replace this:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    with this:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    I've just changed it myself and uploaded it to mediafire. So if you don't want to find and replace it yourself, just download the header.php file from here:
    Code:
    http://www.mediafire.com/?l0vlsg4ddflsds8
    making sure you replace the existing header.php file with the one you download. Make sure you backup your original thought! ;)

    Hope that helps.
     
  17. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    Oh and I accidentally forgot to pu t a "!" in the last one ... sorry :(

    So it should look like this:

    <!--[if IE]>
    Your CSS here
    <![endif]-->
     
  18. iliketurtles

    iliketurtles Regular Member

    Joined:
    Dec 10, 2008
    Messages:
    283
    Likes Received:
    10
    Home Page:
    Np. But I did put it in the right file, right? The ie6.css?

     
  19. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    Looking over the file then you're not suppose to alter the ie6.css file ... so make sure the ie6.css file is exactly how it was! :)

    What you want to do is open up the header.php file and find this:
    Code:
    <!--[if lte IE 6]><link rel="stylesheet" href="<?php bloginfo('stylesheet_directory');?>/ie6.css" type="text/css" media="screen" /><![endif]-->p
    replacing it with this:
    Code:
    <!--[if IE]><link rel="stylesheet" href="<?php bloginfo('stylesheet_directory');?>/ie6.css" type="text/css" media="screen" /><![endif]-->
    ;)

     
  20. iliketurtles

    iliketurtles Regular Member

    Joined:
    Dec 10, 2008
    Messages:
    283
    Likes Received:
    10
    Home Page:
    Still the same. Crap.