...

View Full Version : Newb: Sorry if I couldn't find this. Help with variable and fixed width CSS layouts



zachoff
12-14-2005, 11:27 PM
Is this layout possible with CSS? After a lot of failed attempts, I just can't make it work with CSS without scrollbars but it works fine (with invalid code and depracated tags) across browsers with tables as far as I know...

Table layout:
http://www.zachhegwood.com/otherstuff/tablelayout.html

Anyway, any help would be appreciated.

Thanks.

Graft-Creative
12-16-2005, 01:06 AM
I got pretty close:



<!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>Untitled Document</title>
<style type="text/css">

html, body {
height: 100%;
}

div#header {
height: 85px;
background: #555;
}

div#sidebar {
clear: both;
float: left;
background: #777;
min-height: 100%;
width: 150px;
}

* html div#sidebar {
height: 100%;
}

div#content {
min-height: 100%;
background: #888;
margin-left: 150px;
}

* html div#content {
height: 100%;
}

div#footer {
height: 50px;
margin-left: 150px;
margin-top: -50px;
background: #999;
}

</style>
</head>

<body>
<div id="header"></div>
<div id="sidebar"></div>
<div id="content"></div>
<div id="footer"></div>
</body>
</html>


It's a bit out, but maybe it will give you something to work from.

Kindest regards,

Gary

zachoff
12-16-2005, 01:45 AM
thanks, man... I'll work with that.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum