Posted by Bob on 04/16/06 06:35
How can I center the whole container in IE its is centered in firefox
<?xml version="1.0" encoding="utf-8" ?>
<!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" lang="en" xml:lang="en">
<head>
<title>Title</title>
<style type="text/css">
div {
border: 1px solid #000000;
}
td {
vertical-align: middle;
text-align: center;
}
div.container {
position: relative;
margin: 0 auto;
width: 770px;
height: 600px;
text-align: left;
}
div.left {
position: absolute;
top: 110px;
left: 0px;
width: 150px;
height: 450px;
}
div.top {
position: absolute;
top: 0px;
left: 0px;
width: 760px;
height: 100px;
text-align: center;
}
div.main {
position: absolute;
top: 110px;
left: 150px;
width: 610px;
text-align: justify;
height: 450px;
}
</style>
</head>
<body>
<!-- ... body of document ... -->
<div class="container">
<div class="left">
Left content
</div>
<div class="top">
Top content
</div>
<div class="main">
Main content
</div>
</div>
</body>
</html>
Navigation:
[Reply to this message]
|