Jump to content
xisto Community
BooZker

Ie 6 Conditional Statement Problems Wont Work

Recommended Posts

<!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 rel="stylesheet" type="text/css" href="style.css" />	<!--[if IE 6]>	<link rel="stylesheet" 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.

Share this post


Link to post
Share on other sites

<!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 rel="stylesheet" type="text/css" href="style.css" />	<!--[if IE 6]>	<link rel="stylesheet" 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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.