Forum Moderators: not2easy
I have an issue with MSIE
<?xml version="1.0" encoding="iso-8859-1"?>
<!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>
<title>msie bug</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
body {
background-color: #0E0E0E;
margin: 0px;
padding: 0px;
text-align: center;
}
#maincon {
background-attachment: fixed;
background-image: url(images/bg1.gif);
background-repeat: no-repeat;
background-position: center center;
margin: auto;
display: block;
height: 723px;
width: 100%;
}
-->
</style>
</head>
<body><div id="maincon"> </div>
</body>
</html>
Opera and FF show me centered (verically and horizontally) DIV, MSIE: only horizontally. BG image has a fixed position on MSIE: top margin:0; but I write "auto"
How to fix that?
Thanks,
Nathalie
I found this article, so problem solved
Thanks,
NAthalie
[mod added] extract from linked page, showing the AP (Absolute Positioning) method referred to[/added]
#main {position: absolute; left: 50%; width: 720px; margin-left: -360px; height: 540px; top: -270px }
[edited by: SuzyUK at 9:13 am (utc) on Dec. 5, 2007]
[edit reason] Please No URI's, [/edit]