Forum Moderators: not2easy

Message Too Old, No Replies

ie stylesheets

Both ie6 and ie7 stylesheets not working

         

chipsterbb

9:31 am on Jun 29, 2009 (gmt 0)

10+ Year Member



Hey guys,

This is my code for including separate stylesheets for ie:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<!--[if lte IE 6]>
<link type="text/css" rel="stylesheet" href="screen6.css" />
<![endif]-->
<!--[if IE 7]>
<link type="text/css" rel="stylesheet" href="screen7.css" />
<![endif]-->
<link type="text/css" rel="stylesheet" href="screen.css" />
</head>

But they're not being called. Any ideas? I've used exactly the same code in other sites and it works fine!

Thanks for the help

swa66

10:07 am on Jun 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld! [webmasterworld.com]

In this order and with the same selectors used in the CSS files, (hence the same specificity), the screen.css can overrule the version specific settings.

I'd set the non-commented link to screen.css first.

chipsterbb

10:26 am on Jun 29, 2009 (gmt 0)

10+ Year Member



Absolute genius, many thanks! I spent 3 hours this morning trying to get that to work! :)