View Full Version : Center layout and make layout "dynamic"

11-07-2008, 03:22 AM

I have 2 questions. First, how do I center the entire layout of this page?
Second, how do I make it so that the page resizes (at the bottom) based on the amount of comments?

The code for the page is attached

The site is here (http://housemdvideos.com/layout/5x6.php)

Thanks for your help!

PS. The design is a work in progress

11-07-2008, 05:11 AM
Your css code is a mess... you need to collect each element/class/id into a single definition. Right now you have multiple body definitions, and many definitions that are unneccessarily overwriting each other (specifically your div#container).

This will center your page horizontally:

margin: 0 auto;

To have it expand vertically as your content expands, all you need to do is not specify a height for your content container element(s), and make sure you clear and floats or position: absolutes.

11-08-2008, 03:48 AM
Thanks, will try and get back to you

11-08-2008, 03:45 PM
I have changed the code like you said but it still does not work and the layout is a bit messed up.

If you could take a look at the attached code, that would be great!

11-08-2008, 03:56 PM

div#container {/*5x6.php (line 178)*/
width:962px; /*remove all other styles */
margin:0 auto;
#layout {/*5x6.php (line 96)*/
border:thin none #000000;
margin:0pt auto;

PS: make sure that there is no divitis (http://csscreator.com/?q=divitis)

11-08-2008, 04:03 PM
Ill try that, thanks!

11-08-2008, 04:06 PM
Thanks for the reply!

I tried that and it doesn't quite seem to work.

The code is attached to above post

Thanks for your help!

11-08-2008, 04:14 PM
I tried that and it doesn't quite seem to work.

The code is attached to above post I'm not testing with the attached code, rather directly on the website with the help of firebug. Which is your browser?

btw, there are many errors in your markup, see http://validator.w3.org/check?uri=http%3A%2F%2Fhousemdvideos.com%2Flayout%2F5x6.php&charset=%28detect+automatically%29&doctype=Inline&group=0
Fix them first.

11-08-2008, 04:19 PM
I am using Firefox 3.0.3

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum