J
Jimmy
I am so puzzled by this.
I've got following html and css of 2 column layout.
css:
div#parent{width:100%;border:solid 1px black;background-color:red;}
div#parent div#left, div#parent div#right{width:50%;}
div#left{float:left}
div#left{float:right}
html:
<div id="parent">
<div id="left">Left column</div>
<div id="right">Right column</div>
</div>
Left and right column line up correctly, they go out of parent div
(=#parent) therefore no red background is showing.
And I got rid of float values from both div#left and div#right which
makes both of them stacked on top of each other. And it stays in
div#parent hence red background appears. I've also tried messing
around with position attribute, but it didn't change anything.
Can anyone help me with this?
I've got following html and css of 2 column layout.
css:
div#parent{width:100%;border:solid 1px black;background-color:red;}
div#parent div#left, div#parent div#right{width:50%;}
div#left{float:left}
div#left{float:right}
html:
<div id="parent">
<div id="left">Left column</div>
<div id="right">Right column</div>
</div>
Left and right column line up correctly, they go out of parent div
(=#parent) therefore no red background is showing.
And I got rid of float values from both div#left and div#right which
makes both of them stacked on top of each other. And it stays in
div#parent hence red background appears. I've also tried messing
around with position attribute, but it didn't change anything.
Can anyone help me with this?