Reply
How to make page's content centered
Old 07-05-2007, 09:49 AM How to make page's content centered
Nathand's Avatar
Extreme Talker

Posts: 210
Location: USA
Hi, I'm pretty new to web programming and need a little help. I want to program my website so that the content is in the middle of the page, with back borders on each side. Visit this page to see what I mean:

http://huntington.edu/

They don't have black borders there, but nevertheless that's what I'm trying to do.

How should I do this? I tried using frames and tables, but haven't had much luck with either...

Thanks for the help!
-Nathan
Nathand is offline
Reply With Quote
View Public Profile Visit Nathand's homepage!
 
When You Register, These Ads Go Away!
Old 07-05-2007, 10:21 AM Re: How to make page's content centered
Skilled Talker

Posts: 62
web site can not be found.

but if you have not already. do this to make it centered + border

wrap all your content in a div e.g. <div id="wrap">content</div>

css:
#wrap{
margin:0 auto;
border-left:1px solid black;
border-right:1px solid black;
}
jameslow is offline
Reply With Quote
View Public Profile
 
Old 07-05-2007, 12:08 PM Re: How to make page's content centered
LadynRed's Avatar
Super Moderator

Posts: 6,553
Location: Tennessee
That will work - but not for IE 6 and below.
In order to center in IE 6 and below, you have to add text-align:center to the body declarations:

body{
text-align: center;
}
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-05-2007, 03:02 PM Re: How to make page's content centered
Nathand's Avatar
Extreme Talker

Posts: 210
Location: USA
Thanks to both of you for the replies
Nathand is offline
Reply With Quote
View Public Profile Visit Nathand's homepage!
 
Reply     « Reply to How to make page's content centered
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11648 seconds with 12 queries