PDA

View Full Version : Centering entire compostion


wolfmanbc
11-17-2008, 08:04 PM
I am trying to design a site where everything is centered. The best example I can give is Collegehumor.com. When you expand the browser window everything aligns within the window to remain centered.

I am new to web design and I am having trouble reaching this result. If i center the background it looks right but the tables I've created don't line up when I expand the browser, they both attempt to stay centered but the relative position to each other changes. I feel like this has to be an easy solution but since I'm new to this I just don't know what to do.

I've played with cell padding (using %) on the tables but I dont know how to do that with the background, I dont know if this is the solution or not, Im looking for any help someone can offer on the subject, thanks.

Corrosive
11-17-2008, 08:19 PM
I am trying to design a site where everything is centered. The best example I can give is Collegehumor.com. When you expand the browser window everything aligns within the window to remain centered.

I am new to web design and I am having trouble reaching this result. If i center the background it looks right but the tables I've created don't line up when I expand the browser, they both attempt to stay centered but the relative position to each other changes. I feel like this has to be an easy solution but since I'm new to this I just don't know what to do.

I've played with cell padding (using %) on the tables but I dont know how to do that with the background, I dont know if this is the solution or not, Im looking for any help someone can offer on the subject, thanks.

http://www.dreamweaverclub.com/css-center-content.php

Enjoy :)

wolfmanbc
11-17-2008, 09:56 PM
Thanks for the help but im still having trouble. Im trying to achieve the same layout that you have on your site and yoto has. Do you think Im having problems because Im trying to line the text up with the background image?

I just want to set up my text on the right side of my layout just inside the border of my bg image, and have it stay there by the bg border no matter how large the browser window is.

Corrosive
11-18-2008, 06:10 AM
Thanks for the help but im still having trouble. Im trying to achieve the same layout that you have on your site and yoto has. Do you think Im having problems because Im trying to line the text up with the background image?

I just want to set up my text on the right side of my layout just inside the border of my bg image, and have it stay there by the bg border no matter how large the browser window is.

Hello

I think you need to go and read up and understand the principles of CSS positioning. If you have a two column layout (like Corrosive Online) and then position your text etc. with CSS then it will all stay neatly together. It takes a while to get your head round it but it is worth it in the end. You got anything online we can have a look at and give you some pointers at all?