Forum Moderators: not2easy
When I remove the background from the style sheet, IE just displays a white page. Removing the HTML portion does noting either.
I use this same CSS config on other sites in HTML with no issues for IE. Is this CSS not compatible with XHTML 1.0? What needs to be changed? Thanks.
html {
background-color:#fff;
}
body {
color:#000;
border:1px solid #000;
max-width:1060px;
min-width:960px;
margin:0 auto;
padding:0;
background: url(http://www.example.com/images/example.jpg) repeat;
}
Look at this, it should look the same in all browsers.
I've used a 1px red gif for the background change it to whatevers handy.
#########
<!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>Untitled Document</title>
<style type="text/css">
html {
background-color:#ccc;
}
body {
color:#000;
border:1px solid #000;
max-width:1060px;
min-width:960px;
margin:0 auto;
padding:0;
background: url(1px-red.gif) repeat;
}
</style>
</head>
<body>
<div>hello world</div>
<p>hello</p>
</body>
</html>
###########
Is that how you expected it to look?
Or did you think the whole background would be red?
The css
html {
background-color:#ccc;
}
will overide the
body {
background: url(1px-red.gif) repeat;
}
If you ripped out the doctype of that example above you will notice it now looks different in IE.
One by one I removed lines of CSS, nope all CSS good. Then I moved to the mark-up code and line by line I removed and tested.
It was a closing script tag syntax issue that FF supported and IE didn't, even though the tag validated.
Amazing how good it feels after it's all over :)