Never mind Dean, here's something you can use. You need to assign classes to make it work though.
Code:
<!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>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="description" content="A brief description of the current Web page goes here." />
<meta name="keywords" content="keywords, for, this, page, go, here, only, once, page, content, has, been, finished" />
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body {
background: #000;
color: #FFF;
}
#container {
margin: 0 auto;
width: 700px;
}
#center {
background: #CFC;
color: #000;
float: left;
width: 100%;
}
#wrapper {
margin: 0 150px;
}
#center .no-left {
margin: 0 150px 0 0;
}
#center .no-right {
margin: 0 0 0 150px;
}
#left {
background: #FFF;
color: #000;
float: left;
margin-left: -100%;
width: 150px;
}
#right {
background: #FFF;
color: #000;
float: left;
margin-left: -150px;
width: 150px;
}
.hide-this {
position: absolute;
left: -999em;
}
</style>
</head>
<body>
<div id="container">
<div id="center">
<div id="wrapper">
Center Column
</div>
</div>
<div id="left">
Left Column
</div>
<div id="right">
Right Column
</div>
</div>
</body>
</html>
Add .no-left or .no-right to your #center DIV, and then add the .hide-this class to either the left or right column.
If you want to do this automatically (hopefully) without forcing a page refresh, use some JavaScript to dynamically apply and remove the class via the DOM.
Bookmarks