...

View Full Version : How to center...?



bfinke
10-26-2009, 12:17 AM
Can anyone explain how to center this page:

http://ucmsigeps.com/index.php

I have set the body to having text-align: center and that still didn't do it.

THANKS!

seco
10-26-2009, 12:19 AM
#wrap {
margin:0px auto;
}

bfinke
10-26-2009, 12:33 AM
thanks seco, but the problem is still here. I want the whole page centered but still have the text aligned to left.

Trying the code above:

http://ucmsigeps.com/index.php

Excavator
10-26-2009, 12:44 AM
Hello bfinke,
To center something it has to have a width. Then margin: auto; has something to work with.
Give #wrap a width of 1000px and your margin:0 auto; will center it (you style #wrap twice and the other one has margin: 0; so you will need to delete that)

bfinke
10-26-2009, 01:05 AM
Awesome, thank you.

technica
10-26-2009, 05:36 AM
You can also try using <center></center> tags.

The <center> tag should be just after the <body> tag & </center> should be just before </body> tag.

That makes whole page to be aligned centered.

Excavator
10-26-2009, 07:06 AM
The center tag has been depricated.
http://www.w3schools.com/tags/tag_center.asp



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum