5 replies [Last post]
cseven
Offline
newbie
Last seen: 9 years 9 weeks ago
Timezone: GMT+1
Joined: 2007-12-10
Posts: 2
Points: 0

Hi,

I'm having some problems with my layout.
I have a container div, and inside it i have 3 divs: one for header, one for menu and the last for content.
The problem is that the main container height is not dynamic, so its height is always the same and with the increase of text in the content div, this pulls out from the main container.

My english is not the best, so i've done some pics to illustrate this "problem":

This how the page would be:

This is what happens at this moment:

What can I do?

Thanks!

Triumph (not verified)
Anonymous's picture
Guru

cseven wrote:What can I

cseven wrote:
What can I do?

Thanks!
Clear your floats?

You're welcome!

lokiloks
lokiloks's picture
Offline
Enthusiast
Albuquerque, NM
Last seen: 12 years 9 weeks ago
Albuquerque, NM
Timezone: GMT-6
Joined: 2007-05-16
Posts: 145
Points: 24

add clear:both or

add clear:both or clear:right to the footer element's css

syrupcore
Offline
Enthusiast
Last seen: 13 years 22 weeks ago
Timezone: GMT-8
Joined: 2004-03-10
Posts: 108
Points: 0

add overflow: hidden; to the

add overflow: hidden; to the container div. works like a charm. make sure there is no height set on the container div. this will let it grow/shrink with the content.

will

cseven
Offline
newbie
Last seen: 9 years 9 weeks ago
Timezone: GMT+1
Joined: 2007-12-10
Posts: 2
Points: 0

syrupcore wrote:add

syrupcore wrote:
add overflow: hidden; to the container div. works like a charm. make sure there is no height set on the container div. this will let it grow/shrink with the content.

will

It worked :thumbsup:

Thank you all! Cool

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 10 weeks 3 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

lokiloks wrote:add

lokiloks wrote:
add clear:both or clear:right to the footer element's css

Yes if you have a footer, if not, the overflow trick works best Wink

Verschwindende wrote:
  • CSS doesn't make pies