I'm trying to include a different stylesheet for IE this is the code I am using and I can't get it to work. See anything wrong?
This part might be messing things up.
Could you not just move the part in between the styles into the IE styles since IE is the only browser that supports behaviors? Other than that it looks fine. You may want to do something like lte IE6 rather than just IE. Can you post a link to your site? I also get a 404 error not found when I try navigating to your CSS files in your code.
11-23-2005, 02:07 AM
You were right about the file name. I fixed it moved the behavior and changed it to IE6.
here is my site:
Any other suggestions.
11-23-2005, 02:18 AM
In your #header for your IE styles you have an extra ; and why are you repeating the same styles? I could understand if the styles were different but I compared your stylesheets and most of them are the same. Have you followed the advice I've given you in the other thread? It looks fine in IE. Try validating your page http://validator.w3.org
11-23-2005, 02:24 AM
The styles are pretty much word for word. I was just trying to get it to work before I made any changes. I haven't tried what you said in the other thread. I'm pretty much new to css and have been just hacking my way through it. I
fixed the #header one, accidently left the ; in there when I deleted the url to test if it was importing the correct stylsheet.
11-23-2005, 02:31 AM
I had validated it before. I made the assumptions that those errors were from elements that would not affect the layout. Am I wrong? I am also a little confused it says:
Error Line 8 column 88: end tag for "link" omitted, but OMITTAG NO was specified.
...ss" rel="stylesheet" type="text/css">
This is what I have:
<link href="http://west4me.com/mapping/styles.css" rel="stylesheet" type="text/css">
Could someone explain this to me?
That should work, I didn't check your doctype though.
11-23-2005, 02:57 AM
Thanks that helped with the validation issues of the html.
Still haven't figured out how to import the IE stylesheet.
11-23-2005, 04:16 AM
Figured it out.
I had to use this:
var ie=(n=="Microsoft Internet Explorer")
document.write('<link rel="stylesheet" type="text/css" href="iestyle.css">')
document.write('<link rel="stylesheet" type="text/css" href="styles.css">')