Hey all,
Here is a puzzle for you:
I'm working on a css site design, and am having troubles getting the columns to work correctly. I currently have the site using tables, and want to do away with them except for tabular data.
It has a header that spans the full width of the page.
A navigation pane (<nobr>) on the left side of the page.
A main pane (navigation -> right side of the page).
The main pane cannot wrap around the navigation pane.
The navigation pane is <nobr> to keep the links (product groups) from using multiple lines. The links are built dynamically from a server side script so the width of the navigation pane is not static.
The main pane should be centered within the rest of the page (100% - nav pane width). This could be accomplished one of two ways (that I can see): one - center the div within that space, or two - expand the div to fill the space, and center the content.
Here is the html/css code I've gotten so far (colors for visibility/placement testing):
Thanks!
Here is a puzzle for you:
I'm working on a css site design, and am having troubles getting the columns to work correctly. I currently have the site using tables, and want to do away with them except for tabular data.
It has a header that spans the full width of the page.
A navigation pane (<nobr>) on the left side of the page.
A main pane (navigation -> right side of the page).
The main pane cannot wrap around the navigation pane.
The navigation pane is <nobr> to keep the links (product groups) from using multiple lines. The links are built dynamically from a server side script so the width of the navigation pane is not static.
The main pane should be centered within the rest of the page (100% - nav pane width). This could be accomplished one of two ways (that I can see): one - center the div within that space, or two - expand the div to fill the space, and center the content.
Here is the html/css code I've gotten so far (colors for visibility/placement testing):
Code:
<html>
<head>
</head>
<body style="padding: 0px; margin: 0px;">
<div style="background: #F0F; height: 106px;">Header</div>
<div style="background: #00F; width: 100%;">
<div style="float: left; margin-top: 5px; background: #F00;">Navigation</div>
<div style="float: left; margin-top: 5px; background: #0F0;">other data<br>data<br>data<br>data<br>data<br>data<br>data<br>data<br>data<br>
data<br>data<br>data<br>data<br>data<br>data<br>data<br>data<br>data<br>
data<br>data<br>data<br>data<br>data<br>data<br>data<br>data</div>
</div>
</body>
</html>
Thanks!