How do I make the center column stretch to the full available width, without forcing the left and right columns underneath or above the centered column? Bear in mind this is a cut down example and in the real site:
1) The container width could either be a percentage or a fixed width.
2) Only the left or right column will be visible (not both) and it is up to the user which one.
Thanks,
Mark
-------------------------------------------------------
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
1) The container width could either be a percentage or a fixed width.
2) Only the left or right column will be visible (not both) and it is up to the user which one.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] >
<head>
<title>Example</title>
<style type="text/css">
#container {width:100%;}
#left {width:200px;float:left;border:solid 1px blue;}
#center {float:left;border:solid 1px red;}
#right {width:200px;float:right;border:solid 1px green;}
</style>
</head>
<body>
<div id="container">
<div id="left">Left</div>
<div id="center">Center</div>
<div id="right">Right</div>
</div>
</body>
</html>
Thanks,
Mark
-------------------------------------------------------
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]