I'm at a stand still >.<

Raymond

Seasoned Veteran
Joined
Nov 6, 2008
Messages
3,092
Reaction score
10
FP$
800
Well, I am trying to center an css page area.
Below is my code
Code:
#footer{ background:url(images/footer_bg.jpg) no-repeat 0 0; height:113px; font-family:Tahoma; color:#9a3300}
#footer .indent {padding:31px 0 10px 42px}

How can I make it so the "box" that the text is in is centered.
 
To centre an element, you basically need to give it a width, then set the margins to auto.

So for your code
Code:
#footer{ 
background:url(images/footer_bg.jpg) no-repeat 0 0; 
height:113px; 
font-family:Tahoma; 
color:#9a3300;
margin: auto;
width: 400px; 
text-align: center;
}

Should work 🙂 just change 400px to whatever size you require, then if you want to centre the text without the box, just add
Code:
text-align: center;
as well 🙂
 
Back
Top Bottom