[thelist] CSS: layout question
Nik Schramm
n at industriality.com
Wed Nov 20 17:38:00 CST 2002
On 21.Nov.02 00:15 Chris W. Parker wrote
> here is what i want to do with css that is easily achievable with
> tables.
[snipped a bunch of code]
Not sure what it is you're after, but the look you're achieving with
your tables (header across the top, then menu left & content right 2
col) is easily gotten by floating the menu to the left (note: it *must*
have a width in order to float) and assigning a left margin equal to the
width of the menu to the content.
Sump'n like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title> title me </title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
body { padding: 0; margin: 0; }
div { border: 1px solid black; }
#header { height: 50px; }
#menu { width: 25%; float: left; }
#content { margin-left: 25%; }
//-->
</style>
</head>
<body>
<div id="header">header</div>
<div id="menu">menu</div>
<div id="content">content</div>
</body>
</html>
Tweak at your leisure, or specify more clearly what it is you're after.
Best
--
/nik
More information about the thelist
mailing list