View Full Version : Including Stylesheet for IE and Mozilla

11-23-2005, 12:51 AM
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?

<style type="text/css">
v\:* {
<title>Google Maps</title>

<script src="http://maps.google.com/maps?file=api&amp;=1&amp;key=ABQIAAAAKXvRBd66nY0-PyM9iS6B2hRRxf_3yw7NSNUPgwpBXBN_-FkizBQ9RT5XLq8NC40jvcgfVDmS-78PkQ" type="text/javascript"></script>
<link href="http://west4me.com/mapping/styles.css" rel="stylesheet" type="text/css">
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="http://west4me.com/mapping/iestyles.css" />


11-23-2005, 12:55 AM
This part might be messing things up.

<style type="text/css">
v\:* {
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.
No luck.

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?

11-23-2005, 02:36 AM
<link rel="stylesheet" type="text/css" href="http://west4me.com/mapping/styles.css" />

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 n=navigator.appName
var ns=(n=="Netscape")
var ie=(n=="Microsoft Internet Explorer")
if (ie){
document.write('<link rel="stylesheet" type="text/css" href="iestyle.css">')
if (ns){
document.write('<link rel="stylesheet" type="text/css" href="styles.css">')

Thanks for the help.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum