The IWDN

Advanced Search





You are not logged in.

IWDN Forum Index > Web Development > Web Design, Structure and Style >> Centering (One more time)

Reply
 
Thread Tools
Old February 7th, 2006, 23:49   #1
Corey Bryant's Avatar
Corey Bryant
IWDN Admin
 
Join Date: Nov 2004
Location: Castle Rock, CO
Posts: 2,187
Centering (One more time)

Using
Code:
body
 {
	background: #ffff url("../images/back.gif");
	padding: 0px;
	color: #000;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	margin: 0px auto;
}
#wrapper
{	
	width: 800px;
	margin: 0px auto;
	text-align: center;
}
and
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
for some reason in Internet Explorer, it is not centering. At some point it was and it actually centers on all other pages (using the same style sheet, etc) except for one page.

Reference: [Centering in Firefox
__________________
Corey
My Merchant Account Blog | Expression Web Blog
Corey Bryant is offline   Reply With Quote
Old February 7th, 2006, 23:53   #2
Pauly's Avatar
Pauly
Plan. Design. Invent.
 
Join Date: Oct 2004
Location: Cleveland, UK
Posts: 5,335
Corey I think you missed some mark up?
__________________
IWDN Founder ~ Paul B. Riddick - Entrepreneur & Web Designer
Pauly is offline   Reply With Quote
Old February 7th, 2006, 23:54   #3
the_pm's Avatar
the_pm
Vision - Action = Bovine Excrement
 
Join Date: Oct 2004
Posts: 10,252
I'll bet it has something to do with the actual markup on the page, maybe the wrapper div is missing, or there's a misspelling or something. Can you point to the page?
__________________
"It's not that a plateau is a bad place to be. It's just that sometimes, it gets a little too comfortable."

- Paul Hirsch, IWDN Administrator


THE RESULTS ARE IN! Read about the Great Search Engine Experiment.
the_pm is offline   Reply With Quote
Old February 8th, 2006, 00:04   #4
Corey Bryant's Avatar
Corey Bryant
IWDN Admin
 
Join Date: Nov 2004
Location: Castle Rock, CO
Posts: 2,187
I really wish I could point to the page but this one is sort of secret. I checked everything but all the divs seem to be in place actually. That was one of the first things I checked because the nav bar is also different on the home page of IE but on Firefox everything is perfectly fine. (I just did not know if I missed the obvious (the usual thing) rather than something that I have to dive into a bit more or just tell the programmers - Fix it!) LOL

That is what is more frustrating than anything LOL
__________________
Corey
My Merchant Account Blog | Expression Web Blog
Corey Bryant is offline   Reply With Quote
Old February 8th, 2006, 01:26   #5
kirxklox
Web-Tinker
 
Join Date: Nov 2004
Location: Dardanelle, Arkansas
Posts: 1,208
Put a box around it and see where it centers to.
__________________
kirxklox (Sam Kirk)
Contact by form mail

It is not a job, but an excursion through life!
kirxklox is offline   Reply With Quote
Old February 8th, 2006, 06:10   #6
Martin
Rarely wrong
 
Join Date: Oct 2004
Location: Englishman in Texas
Posts: 894
Can't believe you all missed this. You tired or something?

text-align:center goes on the body. margin:auto goes on the div to be centered (in this case #wrapper), and text-align:left is also applied here to reset the text in standards-compliant browsers.

Thank you all, and goodnight!
__________________
Peace out, bitches.
Martin is offline   Reply With Quote
Old February 8th, 2006, 06:12   #7
the_pm's Avatar
the_pm
Vision - Action = Bovine Excrement
 
Join Date: Oct 2004
Posts: 10,252
Hmm, I simply assumed Corey wanted all of the text inside #wrapper to be aligned to the center, not that he was using this to align the page

The margin style within the body should simply be margin:0 (add padding:0 for us Opera users too please), and that should do it!
__________________
"It's not that a plateau is a bad place to be. It's just that sometimes, it gets a little too comfortable."

- Paul Hirsch, IWDN Administrator


THE RESULTS ARE IN! Read about the Great Search Engine Experiment.
the_pm is offline   Reply With Quote
Old February 8th, 2006, 12:46   #8
Corey Bryant's Avatar
Corey Bryant
IWDN Admin
 
Join Date: Nov 2004
Location: Castle Rock, CO
Posts: 2,187
Thanks - that fixed it. I was trying to center the page / create a way to put the page to the left as well if some users wanted that. And I added the padding as well

Thanks!
__________________
Corey
My Merchant Account Blog | Expression Web Blog
Corey Bryant is offline   Reply With Quote
Reply


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
Forum Jump