DOCTYPES and default

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

Being an avid reader of Zeldman and A List Apart, I changed the doctype on a site that I am working on after reading THIS ARTICLE the other day.

I was using:

but changed it to:

This morning as I started editing the site, I noticed that almost everything was centered. :eek: and the DHTML menu wasn't displaying as usual. I tired to set the to align left in Dreamweaver but it aligned the instead. After blaming my husband for messing with my computer (bless his innocent heart) and scratching my head believing that I had lost my mind, I have come to the conclusion that the align defaults for the doctype below are centered.

And the align default for this one is left.

Any comments on this alignment issue?

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

UPDATE: I have tried to reproduce the above errors (or incident) and can't get it do it again.

Hence, my new conclusion is that I have lost it and am crazy. Laughing out loud

No need to comment on my state of mind. LOL

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

you haven't lost it. Smiling Hold on, I have a link for you.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

http://developer.netscape.com/evangelism/docs/articles/img-table/

this explains the problem.

Using an earlier doctype:

Also works.

Netscape 6 with table layouts has wicked problems if you use the "valid" DOCTYPE.

Additionally, IE6 (? maybe) defaults to centered instead of left, breaking convention. Zeldman noted that in his updates a week or so ago.

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

Hey thanks for letting everyone know that I am really not crazy. hehehe I just knew that I would get kicked out of the forum for this one and probably accused of being mentally unstable. WHEW!!!:ezbill:

I read the article that you posted a while back but had forgotten about it. I will just have to use a doctype without the url. It works fine that way.

I can see how the new doctype would mess with the HTML but why was it messing with Dreamweaver by not letting me do ? That one has me stumped.

Busy's picture

He has: 6,151 posts

Joined: May 2001

I can see how the new doctype would mess with the HTML but why was it messing with Dreamweaver by not letting me do ? That one has me stumped.

Could be since default is left is not allowing it, have you changed default to something else? does it allow ? (default bold and center)

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

Busy, it didn't affect table headers.

I didn't change any defaults (wouldn't know how to do that Wink)

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

I found another article on IE 6 and DTD centering table content if anyone here is interested.

http://www.evolt.org/article/Does_IE_6_Center_Your_Table_Content/17/15341/

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Does that one explain how you just need to add "text-align:center;" to the body tag to get around it? If not I'll dig up that url.

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

no it just talks about eliminating the URI portion of the doctype declaration.

Busy's picture

He has: 6,151 posts

Joined: May 2001

why cant they just pick one way and stick to it *sigh*

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

To get around the IE centering bug issue:

http://bluerobot.com/web/css/center1.html

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

LOL...a hack to hack a hack.:blue:

From bluerobots style:

body {
margin:50px 0px; padding:0px; /* Need to set body margin and padding to get consistency between browsers. */
text-align:center; /* Hack for IE5/Win */ }

#Content {
width:500px;
margin:0px auto; /* Right and left margin widths set to "auto" */
text-align:left; /* Counteract to IE5/Win Hack */
padding:15px;
border:1px dashed #333;
background-color:#eee;

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.