View Full Version : style sheet for different browsers

06-02-2007, 11:00 PM
hi there just a quick question,

im doing a site where ive got a style sheet for firefox and ie7 and a sepearate one for ie 6. and the code i used for forthis switch to happen looks like this...

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Hutton &amp; Co. (Ship Chandlers) Ltd.</title>
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="css/ie6.css" />

now for the quick question. If the ie6 style sheet i created was empty ( contained no stlying what so ever. Will the ie6 browser display my site with no style at all?

because when i remove all the content from the ie6 syle sheet it still displays it has if its reading the style sheet. Is it using the other style sheet instead?


06-04-2007, 12:27 AM
well your conditional statement sez if IE 7....

so your only targeting ie7.... ie6 is still reading ur generic stylesheet

make sense ?

06-05-2007, 03:27 PM
<!--[if IE 7]> <== this means only IE7 will read what is in it.

06-17-2007, 07:57 PM
Hi Guys

<!--[if lt IE 7]> <-----------------means if browser is less than IE7 load this sheet, thats what the lt stands for, less than.

any way how would i write the code that tells the broswer to load a style sheet for a firefox browser?


06-17-2007, 08:26 PM
thanks for clearing that up dazz. As far as I know, only IE has the capability of doing it that way, but I could be wrong ;-)