Zie plaatje : ( kan overigens 18+ banners hebben deze image host site!)
http://www.imagefap.com/image.php?id=307917750
Ik wil dat blauwe vak links naast het groene div vak hebben .. idem voor rechterkant..
Hier de code:
<!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=iso-8859-1" />
<title></title>
<style type="text/css">
<!--
body {
width: 770px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}
.header {
background-color: #CCCCCC;
height: 150px;
width: 770px;
}
.center {
width: 570px;
height: 150px;
background-color: #99FF66;
}
.right {
width: 100px;
float: right;
background-color: #00CCCC;
height: 130px;
}
.left {
width: 100px;
float: left;
background-color: #006699;
height: 150px;
}
-->
</style>
</head>
<body>
<div class = "header">Header</div>
<div class = "center">center</div>
<div class = "right">right</div>
<div class = "left">left</div>
</body>
</html>
Nu kwam ik zelf op zoiets als hieronder , maar dan krijg je het probleem dat 'zodra het content in het middelste stuk groter word 'zowel de rechter als de linker kant naar beneden schuiven .. dus er een wit stuk tussen valt)
<!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=iso-8859-1" />
<title></title>
<style type="text/css">
<!--
body {
width: 770px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}
.header {
background-color: #CCCCCC;
height: 150px;
width: 770px;
}
.center {
width: 570px;
height: 150px;
background-color: #99FF66;
margin-left: 100px;
margin-right: 100px;
}
.right {
width: 100px;
float: right;
background-color: #00CCCC;
position: relative;
top: -150px;
height: 150px;
}
.left {
width: 100px;
float: left;
background-color: #006699;
height: 150px;
position: relative;
top: -150px;
}
-->
</style>
</head>
<body>
<div class = "header">Header</div>
<div class = "center">center</div>
<div class = "right">right</div>
<div class = "left">left</div>
</body>
</html>
Hoe doe ik zoiets op een correcte manier?