PDA

View Full Version : dffrent css files


SpencerJay
07-13-2004, 11:15 PM
how do you send out diffrent css files to diffrent browsers?

one for any version of IE and one for anything else...would be ideal...

¥åßßå
07-14-2004, 02:33 AM
<link href="style.css" type="text/css" rel="stylesheet">
<!--[if IE]>
<link href="IEstyle.css" type="text/css" rel="stylesheet">
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<![endif]-->

And it validates ;)

Gamini
07-14-2004, 04:54 AM
This will associate different stylesheets based on the browser type.


<script language="javascript">

szNavVersion = navigator.appVersion

if (navigator.appName == "Microsoft Internet Explorer") {
if (szNavVersion.indexOf ("4.") >= 0) {
document.writeIN('<link rel="stylesheet" type="text/css" href="Stylesheet url">')
} else {
document.writeIn('<link rel="stylesheet" type="text/css" href="url of stlyesheet">')
}
}

scoutt
07-14-2004, 10:05 AM
Originally posted by ¥åßßå
<link href="style.css" type="text/css" rel="stylesheet">
<!--[if IE]>
<link href="IEstyle.css" type="text/css" rel="stylesheet">
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<![endif]-->

And it validates ;)
mozzila uses the iamgetoolbar too I believe.

Spencer, if you code it correctly you can just one style sheet. ;)

SpencerJay
07-14-2004, 10:36 AM
"Spencer, if you code it correctly you can just one style sheet."

I tried i cant get to line up in IE and firebird...seems like the spaceing/margins /padding or whatever is diffrent between the two browsers...

scoutt
07-14-2004, 12:58 PM
yes they are. IE has a messed up bopx model. it uses the padding and margin for the width and it is not suppose to.

there are many hacks available to do it correctly. so get it like you want it to look like in mozilla. then find out what needs to be done to fix IE. then we can use a hck to set it.

SpencerJay
07-15-2004, 01:52 PM
I'll clean up my css file and post it here. might be a while im lazy right now.
and when you see its crappiness try not to laugh..hehe

imagetoolbar?
is that the thing that resizes the images automaticly? if it is i like it. what so bad about it....

scoutt
07-15-2004, 02:28 PM
imagetoolbar is when you hold your mouse over an image and it gives you options to save it or resize it and a couple of others.

¥åßßå
07-15-2004, 06:15 PM
Image toolbar is just "that annoying thing in the way of images"

I show artwork so I just prefer to turn it off.

And no I don't have a pointless no right-click code ;)

¥