Yet more CSS questions from me.

Associate
Joined
19 Oct 2002
Posts
206
Location
Oop north - where it's grim...
Hi All

More IE problems here... I have the following (test) CSS:

Code:
#rightside{
	 width:100%;
	 height:100%;
	 background-color: green;
}

and this HTML:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

<html>
<head>
<title>Page title</title>
<link rel="stylesheet" href="test.css" type="text/css">
</head>
<body>
<div id="rightside"></div>


</body>
</html>

Now this doesn't work - the background only occupies a few rows at the top of the browser window, rather than expanding to fill all available space (as per Mozilla).

If I change the !DOCTYPE in the web page to HTML 4.0 Transitional, then it works - but I don't want IE running in quirks mode on these pages - I need it to run in standards mode.

Can anyone help?

TIA

Si.
 
Sorry for the late reply - just come back on.

I haven't posted anything as yet - what browser are you using?

the reason it didn't work for me was that #rightside was set to 100% - which is relative to it's parent element - in this case, the <body> - so this also needed setting to 100%.

HTH.
 
Back
Top Bottom