Jump to content

Problem with floating divs


perky416

Recommended Posts

Hi guys,

 

Im doing a quick website for someone. I am trying to give 4 divs the layout below:

 

{        header        }

{left}{center}{right}

{        footer        }

 

I have the left center and right divs floated left to get them in aligned horizontally. The problem im having is that i know float takes the divs out of the flow. So now my footer is half concealed by the floated divs. For example the floated divs are 50px high, and the footer is 100px high, im only able to see the bottom 50px of the footer.

 

Does anybody know a quick way around this?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/237706-problem-with-floating-divs/
Share on other sites

Hi hemo,

 

Do you mean margin-top on the footer?

 

The 3 floated divs are a variable height, they will all be the same height however it varies depending on what content is placed in them.

 

If i use the margin, as soon as the height changes they will overlap again.

 

Thanks

Thanks mate,

 

Cant believe i missed that. I actually remember using that in the past. Putting clear on the footer solved the problem. Thanks mate.

 

your welcome! ;)  don't forget to mark the topic solved, saves us time reading through  :P

Archived

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.