Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-12-2007, 11:33 PM   PM User | #1
vinoman
New Coder

 
Join Date: Jul 2007
Location: Portland, OR
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
vinoman is an unknown quantity at this point
centering content

How do I center the columns, header, and footer on the page?

Please view: http://www.spirit-medium.net/

Thanks
vinoman is offline   Reply With Quote
Old 12-12-2007, 11:39 PM   PM User | #2
Apostropartheid
The Apostate


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Posts: 3,215
Thanks: 16
Thanked 265 Times in 263 Posts
Apostropartheid is on a distinguished road
I actually so thought you were using tables then. Anyway, just wrap it up in a container div, set a width and its margins to margin: 0 auto;. You can center most elements this way.
__________________
Blog | Twitter
Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
Remember: no link, no code, no help!
Apostropartheid is offline   Reply With Quote
Old 12-12-2007, 11:49 PM   PM User | #3
jlhaslip
Regular Coder

 
Join Date: Feb 2007
Location: Canada
Posts: 924
Thanks: 10
Thanked 56 Times in 55 Posts
jlhaslip is on a distinguished road
Code:
html, body {
  margin: 0 auto;
  padding: 0;
  width: 90%;
  background-color: #cfc;  /* light green body color */
  color: #000;

}
jlhaslip is offline   Reply With Quote
Old 12-13-2007, 12:35 AM   PM User | #4
vinoman
New Coder

 
Join Date: Jul 2007
Location: Portland, OR
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
vinoman is an unknown quantity at this point
Quote:
Originally Posted by jlhaslip View Post
Code:
html, body {
  margin: 0 auto;
  padding: 0;
  width: 90%;
  background-color: #cfc;  /* light green body color */
  color: #000;

}
This style is already there. Do I have to create another container and add the style to it?
vinoman is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:35 AM.


Advertisement
Log in to turn off these ads.