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
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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.