How can I do this? (tableless)

liunx

Guest
Is it possible to do this without tables?


<html>
<body>
<div>This divs height will depend on its content, so no height can be set</div>
<div>This divs height will also depend on its content, so no height can be set</div>
<div>This divs height will be the rest of the screen (without creating a vertical scrolllbar)</div>
</body>
</html>Anything tables can do divs can do.Certainlly... but how!? That is the point...Certainlly... but how!? That is the point...Like this:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>
Untitled
</title>
<style type="text/css">
<!--
div{
float: left;
padding: 5px;
margin: 0;
border-right: 1px solid #666;
}
div.fixed{
width: 200px;
}
-->
</style>
</head>
<body>
<div class="fixed">
This divs height will depend on its content, so no height
can be set
</div>
<div class="fixed">
This divs height will also depend on its content, so no
height can be set
</div>
<div>
This divs height will be the rest of the screen (without
creating a vertical scrolllbar)
</div>
</body>
</html>nope, it should work the way this just looks:

body {
margin: 0;
padding: 0;
}

#wrap {
height: 100%;
background-color: red;
}

#div1 {
background-color: green;
}

#div2 {
background-color: blue;
}

#div3 {
background-color: red;
}

<body>
<div id="wrap">
<div id="div1">This divs height will depend on its content, so no height can be set</div>
<div id="div2">This divs height will also depend on its content, so no height can be set</div>
<div id="div3">This divs height will be the rest of the screen (without creating a vertical scrolllbar)</div>
</div>
</body>

sorry i haven纾
 
Back
Top