Ok, I understand that this issue has been overwhelmingly covered already, but I have been browsing the forum for hours now and just can’t seem to fix my problem.
Thing is, I centered a div (container) and the high-child div (banner) works fine, but the to bottom ones (left and right) keep floating away from the parent-div’s width.
I am really new to all this and any help would be fully apreciated.
The .css file:
[code]body {
cursor:default;
margin: 0;
text-align: center;
}
#container {
position: relative;
width: 810px;
margin: 0 auto;
border-spacing: 0px 0px;
right: auto;
left: auto;
clear: left;
padding: 0;
}
#banner {
width: 800px;
height: 310px;
margin: 0;
border-color: #999999;
color: #ffffff;
font: 8pt ‘Lucida Grande’, LucidaGrande, Lucida, Helvetica, Arial, sans-serif;
padding-top: 0px;
padding-bottom: 0px;
text-align: left;
}
#left {
width: 400px;
margin: 0;
padding: 0;
float: left;
}
#right {
margin: 0;
padding: 0 0 0 0px;
border-left: dashed #666666 2px;
float: right;
width: 200px;
}
The html code:
[code]<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<title>:eveRlasT .//</title>
<meta content=”text/html; charset=ISO-8859-1″ http-equiv=”content-type”>
<link href=”stylish.css” rel=”stylesheet” title=”stylish.css” type=”text/css” />
</head>
<body>
<div class=”container”>
<div class=”banner”><img src=”interface/banners/random.php”></div>
<div id=”left”>lteste</div>
<div id=”right”>rteste</div>
</div>
</body>
</html>
I know it’s pretty clean right now, and I hope it helps you help me! …