Jump to content

Div extending vertically contain all contents


HyperDrive

Recommended Posts

Hi, I'm relatively new to CSS, and I am trying to create a website which uses an external css stylesheet. My website is structured using divs, with each div floating. The problem is that the main containing div, which contains everything else, doesn't extend vertically to accomodate the divs inside. What I would like is the main containing div to extend vertically to contain all the contents, no matter what height they are, and if their combined height is less than the height of the browser window, for the container div to continue and stretch to the bottom of the window. I realise this probably sounds a stupid question, and perhaps it's a really obvious problem, but it's really frustrating me. How can I fix this problem? Or perhaps I'm doing this all wrong, in which case a better solution would be great! Thanks. Andrew

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...