HOME       >>       Programming

Ie 6 Conditional Statement Problems Wont Work


BooZker

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/; xml:lang="en" lang="en"><head> <title>Home</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link type="text/css" href="style.css" /> <!--[if IE 6]> <link type="text/css" href="ie6style.css" /> <![endif]--></head>

OK that's my code. I have been using IE conditionals for awhile and never had any problems. Now it wont work at all. I have tried so many different ways and nothing works. I would prefer it to be in the /css directory, but i dont know, it didn't work there so i tried the root.

you can view this file at http://forums.xisto.com/no_longer_exists/

FF and Safari it looks like it is supposed to (and i didn't design just slicing it for a client)

IE6 is having the issues and I just want to put a conditional in there and it will fix it all. The top shadow you see in FF and Safari should be gone in IE6 because i took it out to test it. So you can see if the shadow that shadow is gone.

chaosdesign

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/; xml:lang="en" lang="en"><head> <title>Home</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link type="text/css" href="style.css" /> <!--[if IE 6]> <link type="text/css" href="ie6style.css" /> <![endif]--></head>
OK that's my code. I have been using IE conditionals for awhile and never had any problems. Now it wont work at all. I have tried so many different ways and nothing works. I would prefer it to be in the /css directory, but i dont know, it didn't work there so i tried the root.

you can view this file at http://forums.xisto.com/no_longer_exists/

FF and Safari it looks like it is supposed to (and i didn't design just slicing it for a client)

IE6 is having the issues and I just want to put a conditional in there and it will fix it all. The top shadow you see in FF and Safari should be gone in IE6 because i took it out to test it. So you can see if the shadow that shadow is gone.
What you need is the condition before the normal style sheet

A basic form of this is the If-Then-Else statment

If (logic happenes ie Browser),

Then (use this style sheet)

Else (or if logic isn't true then use this style sheet)

The above just gives you an idea of how to approach the situation.

jlhaslip

Nope, he has it right.

Load the main css file first and then the IE css file only needs to contain the rules that should change if the Browser is an IE and meets the contitional. The Conditional can be used to select specific IE versions, too.

 

<!--[if IE 6]>Special instructions for IE 6 here<![endif]-->
From http://www.quirksmode.org/css/condcom.html

 

Looks good to me.

 

Check the file path? and remember that the references to images inside the css file should be referenced from the CSS file, not the HTML file.

 

*** edit ***

 

you are missing the style for the nav container in ie css file so the styling from the non-ie stylesheet is continuing to affect the NavContainer, which is likely the problem you are having.


mahirharoon

no problem with ie6 when checked



VIEW DESKTOP VERSION REGISTERGET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.