Forum Moderators: not2easy

Message Too Old, No Replies

CSS not loading in IE

Stylesheet doesn't load in IE but does in Safari

         

nzmuso

12:38 am on Jan 23, 2006 (gmt 0)

10+ Year Member



I'm making a site and have got as far as finalising the layout. This morning everything was working fine, but after mucking around a bit (all I can remember doing is adding a IE PNG fix and a javascript drop down menu) the stylesheet isn't loading in windows IE any more (I've tried on two windows computers). It loads fine in safari and opera. I've tried undoing each change (and both) but still am having no luck. Any ideas?

This is the code:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>WYM</title>

<script type="text/javascript" src="anylink.js">
/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit [dynamicdrive.com...] for full source code
***********************************************/
</script>

<!--[if lt IE 7.]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->

<style type="text/css">
@import url(styles.css) screen;
</style>

</head>
<body>

D_Blackwell

1:04 am on Jan 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try calling the style this way, and see if the @import is a factor.

<link rel="stylesheet" type="text/css" media="screen" href="styles.css" />

D_Blackwell

1:08 am on Jan 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or try dropping 'screen' from the @import, and it see if IE behaves.

<style type="text/css">
@import url(styles.css);
</style>