Jump to content

Using clear both in a non floated div with fixed margin


Recommended Posts

I trying to build a page that has a variable width depending on the viewing monitor that also has a fixed column to one side.


My problem is that when I have floated divs in the none floated div and put <br style="clear; both;"/> under the divs or apply the clear to the p tag the clear drops below the right column.


I thought the clear style only applied to it's containing div.


How can I fix this?




This image is an example of my problem


Link to comment
Share on other sites

  • 2 weeks later...

You should add a div after the two coloured divs which has the CSS for clearing the floats.


This will allow any content that is after these two divs to be displayed below them on the page, instead of underneath them, as would be the case if the float wasn't cleared.



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.