Forum Moderators: not2easy
<!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" style="height:100%;">
<head runat="server">
<title>trying to learn css</title>
</head>
<body style="height:100%;">
<div style="margin:auto; width:1000px; height:100%;">
<div style="width:200px; float:left; height:100%; background-color: grey;">
hey<br />hey<br />hey<br />hey<br />hey<br />hey
hey<br />hey<br />hey<br />hey<br />hey<br />hey
hey<br />hey<br />hey<br />hey<br />hey<br />hey
hey<br />hey<br />hey<br />hey<br />hey<br />hey
hey<br />hey<br />hey<br />hey<br />hey<br />hey
hey<br />hey<br />hey<br />hey<br />hey<br />hey
</div>
<div style="width:600px; float:left; background-color:Green; height:100%;">center content</div>
<div style="width:200px; float:right; height:100%; background-color: red;">
hey<br />hey<br />hey<br />hey<br />hey<br />hey
hey<br />hey<br />hey<br />hey<br />hey<br />hey
</div>
</div>
</body>
</html>
[edited by: alt131 at 1:03 pm (utc) on Nov 27, 2011]
[edit reason] Thread Tidy - 404 [/edit]
I'm about too scrap the div layout and go with tables. I'm trying to build a 3 column layout where all three columns are the same height.Using divs-for-layout in the way you are is much the same as using tables-for-layout, so that might be an option that works best for you. However, the css property table/row/cell orders divs to behave in a way that is similar to tables. Some older browsers that support this need the full "table" structure, but try:
¡¡XHTML CODE£º
¡¡¡¡Example Source Code
¡¡¡¡<body>
¡¡¡¡<div id="header">
¡¡¡¡<h1>Header</h1>
¡¡¡¡</div>
¡¡¡¡<div id="left">
¡¡¡¡Port side text...
¡¡¡¡</div>
¡¡¡¡<div id="right">
¡¡¡¡Starboard side text...
¡¡¡¡</div>
¡¡¡¡<div id="middle">
¡¡¡¡Middle column text...
¡¡¡¡</div>
¡¡¡¡<div id="footer">
¡¡¡¡Footer text...
¡¡¡¡</div>
¡¡¡¡</body>¡¡¡¡Below CSS Code£º
¡¡¡¡Example Source Code
¡¡¡¡body {
¡¡¡¡margin: 0px;
¡¡¡¡padding: 0px;
¡¡¡¡}
¡¡¡¡div#header {
¡¡¡¡clear: both;
¡¡¡¡height: 50px;
¡¡¡¡background-color: aqua;
¡¡¡¡padding: 1px;
¡¡¡¡}
¡¡¡¡div#left {
¡¡¡¡float: left;
¡¡¡¡width: 150px;
¡¡¡¡background-color: red;
¡¡¡¡}
¡¡¡¡div#right {
¡¡¡¡float: right;
¡¡¡¡width: 150px;
¡¡¡¡background-color: green;
¡¡¡¡}
¡¡¡¡div#middle {
¡¡¡¡padding: 0px 160px 5px 160px;
¡¡¡¡margin: 0px;
¡¡¡¡background-color: silver;
¡¡¡¡}
¡¡¡¡div#footer {
¡¡¡¡clear: both;
¡¡¡¡background-color: yellow;
¡¡¡¡} [edited by: tedster at 6:19 pm (utc) on Apr 29, 2011]
[edit reason] no personal links, please [/edit]