'if IE 6' to work for all versions

iliketurtles

Regular Member
Joined
Dec 10, 2008
Messages
286
Reaction score
10
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?
 
I changed the code in the header, from <!--[if lte IE 6]> to <p><!--[if IE]> and nothing happened.

Suggestions?
 
If it is just a few css changes you can use the '_' hack for ie6 or '*' hack for ie6/7
 
Make sure your css inside <!--[if lte IE 6]> is working correctly.
 
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.
 
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.
 
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
 
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
 
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. :)

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
 
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
 
Try opening it in IE... :rolleyes: Microsoft iz dah sux0rs

Drochilli 1.05 is the template I`m using. http://wp-extend.com/themes/drochilli/

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.
 
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]-->
 
Np. But I did put it in the right file, right? The ie6.css?

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]-->
 
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]-->

;)

Np. But I did put it in the right file, right? The ie6.css?
 
Back
Top