Quote:
|
My question for the Lady is where would you have used the clear you recommended -- in a new div?
|
I use a <br> for my clearing element, which adds no structural markup.
.brclear{
clear:both;
height:0;
margin:0;
font-size: 1px;
line-height: 0;
}
In the html it's just <br class="brclear" /> . In the example given, I'd put in the clearing <br> following the close of the right column, like this:
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
<style>
body {
background-color:#000000;
}
#inner_body {
width:80%;
margin-left:auto;
margin-right:auto;
background-color:#ff0000;
}
#navigation {
width:100%;
}
#page_body {
width:100%;
}
#left_column {
float:left;
width:24.9%;
background-color:#00ff00;
}
#right_column {
float:left;
width:75%;
background-color:#0000ff;
}
.brclear{
clear:both;
height:0;
margin:0;
font-size: 1px;
line-height: 0;
}
</style>
</head>
<body>
<div id="inner_body">
<div id="navigation">
<a href="#1">Option 1</a>
<a href="#2">Option 2</a>
<a href="#3">Option 3</a>
<a href="#4">Option 4</a>
<a href="#5">Option 5</a>
</div>
<div id="page_body">
<div id="left_column">
<h2>Left Options</h2>
<p>This is where sub-navigation is placed for the primary navigation's objects.</p>
</div>
<div id="right_column">
<h1>Main Content Area</h1>
<p>Main content area.</p>
</div>
<br class="brclear" />
</div>
</div>
</body>
</html>
|
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
Last edited by LadynRed; 01-05-2008 at 07:28 PM..
|