DOCTYPE centers everything

W

W3C newbie

This is more of an html question than Front Page. My pages
have had <html > without a doc type all along.
I want to make the site W3C compliant and so put in this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"
<html lang="EN-US" >

Everything that is not specifically justified now comes up
centered rather than left justified. This includes the
content in a javascript pull down menu.

What the heck...
 
C

chris leeds

maybe if you try an "older" spec. for the html?

I feel your pain though. I've been playing around with a .css layout most
of the day and oddly enough the best rendering is when I leave the doctype
OFF.

I think I'll have to figure it out the "right way" though. ;-)
 
K

Kathleen Anderson [MVP - FP]

Hi W3C newbie:
If the content that is being centered is content within table cells, it's
because beginning with IE5, if you do not specify an alignment for the cell
content, it will inherit its alignment from the alignment you specified for
the table that contains those cells. So, if the table is centered and you
want the cell content aligned left, you have to specify align="left" in your
<TD> tag.

--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/
Connect to the Newsgroups with Outlook Express
http://www.tushar-mehta.com/misc_tutorials/oe_ng/index.html
 
J

Jon Spivey

Chris,
I think the "right" way - if there is such a thing :) is to design with a
full doctype and test in the best CSS browser available, which to my mind is
Firefox at the moment. If you can get your site right with a doctype in this
browser you can be fairly sure your code is technically correct. Then make
whatever adjustments you need to match your layout in IE6, then cater for
IE5, then decide what you want to do about crap browsers, ie Netscape4. Now
that Netscape 4 is pretty much out of the picture IE5 seems to have taken
it's role as "the worst browser we have to support."
 
C

chris leeds

thanks for the tips.
I'm getting pretty much the same thing in firefox/mozilla as I am in ie6.

I guess I'll have to go look for a doctype to go with it. ;-) then probably
re-adjust.....
 
K

Kevin Spencer

Making your web site W3C-compliant is an exercise in futility. Making your
web site successful is a much better approach. Rather than trying to satisfy
some software that checks for W3C-correctness, try satisfying your target
audience.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
S

Steve Easton

Kevin said "Making your web site W3C-compliant is an exercise in futility."

I'm glad I'm not the only one that feels that way.
Perfect example, colored scrollbars.
Only work in IE and other browsers ignore them, but a site that uses them won't validate.
Have a hyperlink on a page that contains & site won't validate.
( and that's just the beginning )

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
J

Jon Spivey

That misses the point of validation Kevin. The point of W3C compliance, ie
"standards" is to use HTML for it's intended purpose - structuring your page
and then using CSS to make it look it pretty. As opposed to things like
tables nested 5 deep transaprent gif and all that nasty stuff we all grew up
with. . From the designers point of view building pages "properly" means
you can do twice the work in half the time - a very worthwhile goal to my
mind :) I don't understand why anyone sticks to the old way of doing
things.

If you mean by validation getting zero errors so you can put the Valid HTML
logo on your page then I'd agree that's a waste of time. Who's going to be
impressed by that logo anyway? More importantly is having it going to make
more sales on your site - I doubt it :) I use the validator in the same way
as a spell checker - you write an email spell check it the spell checker
throws up a couple of misspelled words - you say thank you very much I didnt
notice them and correct them. Then it throws up a word that you meant to
spell worng, or that you knew wasn't in the dictionary - you ignore the
error because you know you're right. Steve's point about colored scrollbars
is a good one - so what if they don't validate you want to use them, you
know they work and won't cause any ill-effects in other browsers so you use
them. The point of validation is to use it to help you - not to tell you
what to do :)
 
D

David Baxter

I would add that among the myths of W3C validation are: it will make
your pages load faster, and it will improve your position in search
engine rankings. Neither is true.
 
W

W3C Newbie

Thanks for this, the tables are in fact centered and the
TD tags don't specify align left.

It's a 100+ page site, so DOCTYPE ain't a-gonna happen
except on new pages.

I agree that success is more important than strict W3C
compliance. I don't care about the logo. Yet, W3C is the
standard for this stuff...do you want your web site to
work for all of your customers, or do you only care about
those with IE and broadband?
Same thing with CSS and Bobby, strict compliance is a
waste, but knowing the fundamentals is just part of the
job.
 
T

Thomas A. Rowe

I have to disagree, as I find it faster and easier to build sites with tables then to use CSS for
any type of positioning or worry about DOC TYPEs.

The only folks that care about DOC TYPEs, W3C Recommendations, are web developers or developers that
must following government agencies requirements.

Using CSS is just another choice of how to design a web site, it is not a requirement or a standard,
it is just a choice, a tool so to speak, that each developer has.

More importantly, site visitors don't care about DOC TYPEs, W3C Recommendations, they only care if
the site displays correctly in the browser they are using, and that the site has the information or
product they are looking for, otherwise they just move on to another site.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
K

Kevin Spencer

Hi Jon,

Of course, I agree with you, especially with this remark:
The point of validation is to use it to help you - not to tell you
what to do

As you are probably aware, I'm all about standards. I have noticed, however,
a rather large group of people who want to validate their HTML without
understanding anything about it. This is, I'm sure you would agree, putting
the cart before the horse.

For a beginning HTML developer, I tend not to advise trying to make the
validator software happy, but rather, to learn HTML, related Internet
devopment technologies, and the intricasies of the Internet. It is also
important to keep in mind that the standards are constantly changing. What
passes a validator today isn't goint to tomorrow.

So, I appreciate your clarification of the situation. :)

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top