1

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?

Sergio Tapia
  • 40,006
  • 76
  • 183
  • 254

2 Answers2

2

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
  • 37,282
  • 14
  • 64
  • 100
  • For vertical centering I've had to resort to tables. I die a little inside every time I do it. – Jon B Sep 01 '09 at 15:57
  • That sounds good. :) Can I wrap my master page with a
    tag though? :S
    – Sergio Tapia Sep 01 '09 at 15:58
  • 1
    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 and the closing div tag right above . – John Rudy Sep 01 '09 at 16:11
  • @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 Sep 01 '09 at 16:12
0

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
  • 27,363
  • 32
  • 109
  • 125