Re: simple css quest
ok, i'll reword it, and thanks
ok lets say you have two elements in a div you want to float, but you want them both to be contained in lets say a background color. if you float all elements within a div, the background will 'disappear'.
in the example below, see how currenlty the two div's float nice, and the 'container' background has the grey background, but how if you take out the div with the 'clear', that the container background doesn't show.
This is a very basic sample of what technically is the problem. Thanks for any help
<style>
.container {
background: #ddd;}
.container div.xx, .container div.yy {
float: left;}
.clear {
clear: both;
}
</style>
<div class="container">
<div class="xx">left text | </div>
<div class="yy">right text</div>
<div class="clear">clear</div>
</div>
|