views:

112

answers:

2

Here's how it looks like right now:

my screenshot

Is there a way for me to center the area that has content, and place a repeating background image so the site doesn't look so empty?

A: 

It looks to me like you just need some padding on the top and left in your content area.

Sorry I didn't realize your page was only a portion of the screen.

Why not splice your site into parts (divs) and use a fluid layout? Here is an article from Smashing Magazine about Fixed vs Fluid layouts.

Bryan Denny
Not enough time. I have to hand in this project in 1 hour. :P Can I wrap my master page inside of a <div> tag?
Sergio Tapia
+2  A: 

Centering horizontally can be accomplished by wrapping the content you wish to center in a div, and applying the style:

margin-left: auto;
margin-right: auto;

to said div.

This will take care of your issue of space on the right. You can place a background image (repeating or not) using CSS as well.

Your larger issue will be the vertical centering. As far as I'm aware, there's (currently) no easy, cross-browser (including IE6/7) way of accomplishing that. I'd like to be proven wrong here by another user, though. :)

John Rudy
For vertical centering I've had to resort to tables. I die a little inside every time I do it.
Jon B
That sounds good. :) Can I wrap my master page with a <div> tag though? :S
Sergio Tapia
You can wrap that portion in a div tag, or the Content Area. You could wrap the entire thing in a div tag by having the opening div tag just beneath <body> and the closing div tag right above </body>.
John Rudy
@Jon: Yup, been there, done that. Same dirty feeling. I also have the same problem trying to make equally-sized columns. (Which *really* shouldn't be as difficult as it actually is ... )
John Rudy