I'm trying to set up a table-less layout using CSS. I have a simple two-column layout that works great in IE, but has a bug in FF.
In the code below, when the contents of the content_area DIV are a few words, the two columns are fine in both IE and FF. However, if the 2nd column contains enough text to run onto the next line, then the column acts like a row in FF. It moves below the 1st column.
I'm sure it's a simple thing. Any idea what needs to be done?
Thanks.
Expand|Select|Wrap|Line Numbers
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>2 col</title>
- <style type="text/css">
- <!--
- body{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;}
- .page_container{margin-left:0;margin-right:auto;width:800px; padding-left:0; margin-top:0; padding-top:0; background-color:#FFFFFF; overflow:auto}
- .nav_area{display:inline;float:left;margin-left:10px;margin-right:10px; max-width:110px; min-width:110px; border:dotted}
- .content_area{display:inline;float:left;margin-left:10px;margin-right:10px; background-color:#99FFFF; min-width:300px; white-space:nowrap}
- body {
- background: #123;
- color: #333;
- }
- -->
- </style>
- </head>
- <body>
- <div class="page_container">
- <div class="nav_area">
- blah blah
- </div>
- <!-- end .nav_area -->
- <div class="content_area">
- <p>sss ssss ssssss ssssss ssssss ssssss ssssss ssssss ssssss ssssss ssssss ssssss ssssss ssssss ssssss ssssss ssssss ssssss sssss</p>
- </div>
- <!-- end .content_area -->
- <div class="clear"></div>
- </div>
- <!-- end .page_container -->
- </body>
- </html>