PDA

View Full Version : div height and width 100% in ie???


nectar
05-28-2003, 06:11 PM
Would appreciate any help
Need the background to change according to which css is chosen. In one css I have a repeating pattern which is to fill the screen, I have in a div, height 100% width 100%, in mozilla ok, but the usual...ie doesn't fill the page with the pattern, the height is only the height of the pattern and the width doesnt fill the width of the screen. Anyone have a workaround
Thought of a table, 100%, and giving it a class with the pattern in it???
Thanks

cg9com
05-28-2003, 06:35 PM
Try adding a 100% width and height to the body element via CSS, removing the margins will help as well.

Frank
05-28-2003, 06:38 PM
It is hard to know what the problem may be.

If you included the code that would be more helpfully.
In the meantime this may help.

<style type="text/css">
body
{
background-image:
url("sample.jpg");
background-repeat: repeat-x
background-repeat: repeat-y
}
</style>

Graeme Hackston
05-28-2003, 08:35 PM
try this

html, body {
margin: 0;
padding: 0;
}

nectar
05-28-2003, 10:45 PM
Yep, putting the css to the body element did it
Thanks, my mistake in thinking I needed a div.