0

I am trying to put 2 columns into a website, I've got that to work fine but for whatever reason, the rest of the page doesn't change size to suit the content in the left column. Here is how it looks: www.kelownafoodspecials.com/indexsides.php.

Pretty stuck so any advice would be greatly appreciated. Thanks,

K

4 Answers 4

2

You should add <div style="clear:both;"></div> directly after your #contentright

Sign up to request clarification or add additional context in comments.

Comments

0

you must float your #content div also. For any elements decalres as float:left(or right), if their containing elements are not also floated elements, the containing elements will not expand to fit the content and it will overlay it's containing element as you are seeing there.

Comments

0

Try this (assuming none of your content is meant to overflow)

#content {
    overflow: hidden;
}

I just tried it using Firebug, and nothing appears to be chopped off (and the #content will expand to contain it's floated child).

Comments

0

You could append a <div class="clear"/> whose style could like like:

.clear {
  clear:both;
  display:block;
  float:none;
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.