...

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



millsi80
11-07-2008, 04:22 AM
Hi,

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

itsallkizza
11-07-2008, 06: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:


div#container
{
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.

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

millsi80
11-08-2008, 04: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!

abduraooft
11-08-2008, 04:56 PM
Try

div#container {/*5x6.php (line 178)*/
width:962px; /*remove all other styles */
margin:0 auto;
position:relative;
}
#layout {/*5x6.php (line 96)*/
background-color:#999999;
border:thin none #000000;
/*left:auto;
margin:0pt auto;
right:auto;
top:auto;
width:926px;*/
}

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

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

millsi80
11-08-2008, 05: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!

abduraooft
11-08-2008, 05: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.

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum