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 01-17-2008, 05:29 AM   PM User | #1
passingthrough
New to the CF scene

 
Join Date: Jan 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
passingthrough is an unknown quantity at this point
Center entire page in browser

How can I center a fixed width page in the browser window without tables?

I've tried the fixes in existing posts, but they don't seem to do it here.

page is at www.mymangosteencards.com

Thanks
passingthrough is offline   Reply With Quote
Old 01-17-2008, 05:58 AM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello passingthrough,
Your on the right track by using margin left/right auto and using a doctype... it's trying to center your #content but the 1800px width is just too wide.
Narrow that down to 900px or so and see -
Code:
div#container
{
   width: 900px;
   position: relative;
margin: 0 auto;
background: #000;
height: 3000px;
   text-align: left;
}
There is still plenty of other problems though. All the absolute positioning is really messing things up. Try removing the height:3000px; and you'll see the black background disapear.

Run your code through the validator and see if fixing as many errors as you can doesn't improve things - see my suggestion and links about validating in my sig below.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator 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 12:18 AM.


Advertisement
Log in to turn off these ads.