Forum Moderators: not2easy
I can lay these out with the old fashioned table method but this gets very confusing with tables inside tables, etc.
However, I can't see a way of doing the same thing using DIVS. If I use a <div> for each box then I can lay them out using absolute or relative positioning but this won't take into account screen resolution size. If a user with a wider screen views the page, the positioning will be all messed up?!
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style.css" />
<!--[if IE]>
<link rel="stylesheet" href="ie.css" media="screen" />
<![endif]-->
</head>
<body>
<div id="wrapper">
<div id="container">
<div id="topLeft">
top left float<br />
</div>
<div id="topCenter">
top center float<br />
</div>
<div id="topRight">
top right float<br />
</div>
<div id="leftMiddle">
left middle float<br />
</div>
<div id="rightMiddle">
right middle float<br />
</div>
<div id="bottom">
bottom float<br />
</div>
</div>
<div id="footer">
footer float<br />
</div>
</div>
</body>
</html>
CSS style.css:
body {
margin: 0px auto;
background-color: #000;
}
#wrapper {
width: 100%;
margin: 0px auto;
}
#container {
width: 100%;
position: relative;
left: 0px;
top: 0px;
}
#topLeft {
width: 33%;
float: left;
border-style: solid;
border-width: 1px;
border-color: #f90;
color: #fff;
clear: left;
}
#topCenter {
width: 33%;
float: left;
border-style: solid;
border-width: 1px;
border-color: #f00;
color: #fff;
clear: none;
}
#topRight {
width: 33%;
float: right;
border-style: solid;
border-width: 1px;
border-color: #cc0;
color: #fff;
clear: right;
}
#leftMiddle {
width: 33%;
float: left;
border-style: solid;
border-width: 1px;
border-color: #00f;
color: #fff;
clear: left;
display: in-line;
}
#rightMiddle {
width: 33%;
float: left;
border-style: solid;
border-width: 1px;
border-color: #d0d;
color: #fff;
clear: right;
}
#bottom {
width: 33%;
float: left;
border-style: solid;
border-width: 1px;
border-color: #fff;
color: #fff;
clear: both;
}
#footer {
width: 33%;
border-style: solid;
border-width: 1px;
border-color: #cc0;
color: #fff;
clear: both;
}
Just for IE in seperate ie.css:
#rightMiddle {
clear: none;
}
Is that what you mean?