DOCTYPE causing unwanted page rendering

  • Thread starter Kulvinder Singh Matharu
  • Start date
K

Kulvinder Singh Matharu

Hi,

To align with html standards, I've added the following DOCTYPE to
some of my webpages....

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

However, when I view these pages in IE6 (or the Preview in FP2002), I
am getting unexpected and unwanted results.

Specifically, normal text within tables seem to be centre-aligned as
opposed to being left-aligned.

For example :

1. Page with DOCTYPE
<http://www.metalvortex.com/myphotos/morocco/jardin_menara.htm>

2. Page without DOCTYPE
<http://www.metalvortex.com/myphotos/vietnam/halong_bay_1.htm>

There are other changes such as text being of different size, etc.

I'm not sure if its something to do with the linked CSS file which is
here...

<http://www.metalvortex.com/main.css>

Can anyone see what I've done wrong? Thanks in advance!

Regards,

--
Kulvinder Singh Matharu
Contact details : http://www.metalvortex.com/form/form.htm
Website : http://www.metalvortex.com/

"It ain't Coca Cola, it's rice" - The Clash
 
K

Kathleen Anderson [MVP - FP]

Hi:
You haven't done anything 'wrong'. Using that DOCTYPE requires that you also
specify alignment for the table cells, otherwise they inherit their
alignment from the table.
 
S

Stefan B Rusynko

And the type of doctype to apply affects IE CSS support in standards compliant or quirks mode
See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp

--




| I should add that this became evident with IE6 - I don't think this happened
| with previous versions.
|
| --
| ~ Kathleen Anderson
| Microsoft MVP - FrontPage
| Spider Web Woman Designs
| http://www.spiderwebwoman.com/resources/
|
|
| > Hi:
| > You haven't done anything 'wrong'. Using that DOCTYPE requires that
| > you also specify alignment for the table cells, otherwise they
| > inherit their alignment from the table.
| >
| >
| >> Hi,
| >>
| >> To align with html standards, I've added the following DOCTYPE to
| >> some of my webpages....
| >>
| >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
| >> "http://www.w3.org/TR/html4/loose.dtd">
| >>
| >> However, when I view these pages in IE6 (or the Preview in FP2002), I
| >> am getting unexpected and unwanted results.
| >>
| >> Specifically, normal text within tables seem to be centre-aligned as
| >> opposed to being left-aligned.
| >>
| >> For example :
| >>
| >> 1. Page with DOCTYPE
| >> <http://www.metalvortex.com/myphotos/morocco/jardin_menara.htm>
| >>
| >> 2. Page without DOCTYPE
| >> <http://www.metalvortex.com/myphotos/vietnam/halong_bay_1.htm>
| >>
| >> There are other changes such as text being of different size, etc.
| >>
| >> I'm not sure if its something to do with the linked CSS file which is
| >> here...
| >>
| >> <http://www.metalvortex.com/main.css>
| >>
| >> Can anyone see what I've done wrong? Thanks in advance!
| >>
| >> Regards,
|
 
A

Andrew Murray

Kulvinder Singh Matharu said:
Hi,

To align with html standards, I've added the following DOCTYPE to
some of my webpages....

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

However, when I view these pages in IE6 (or the Preview in FP2002), I
am getting unexpected and unwanted results.

Specifically, normal text within tables seem to be centre-aligned as
opposed to being left-aligned.

For example :

1. Page with DOCTYPE
<http://www.metalvortex.com/myphotos/morocco/jardin_menara.htm>

2. Page without DOCTYPE
<http://www.metalvortex.com/myphotos/vietnam/halong_bay_1.htm>

There are other changes such as text being of different size, etc.

I'm not sure if its something to do with the linked CSS file which is
here...

<http://www.metalvortex.com/main.css>

Can anyone see what I've done wrong? Thanks in advance!

Regards,

--
Kulvinder Singh Matharu
Contact details : http://www.metalvortex.com/form/form.htm
Website : http://www.metalvortex.com/

"It ain't Coca Cola, it's rice" - The Clash


I'm not sure I see the differences you're talking about - the menus are
centre-aligned in both pages and in any case this is nothing to do with DOCTYPE.

you use the Align=..... inside your tags, or using CSS to format and layout text
and so on on the screen.

I was using IE 6.0.
 
K

Kathleen Anderson [MVP - FrontPage]

Andrew:
It's not the menu - it's the text under the picture.

In IE6, with a valid DOCTYPE, if the table is centered and the alignment for
individual cells is not specified, the cells will inherit their alignment
from the table.

Without a DOCTYPE, the cell alignment will default to the Default (which is
left).


--

~ Kathleen Anderson
Microsoft FrontPage MVP
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/
 
K

Kulvinder Singh Matharu

Hi:
You haven't done anything 'wrong'. Using that DOCTYPE requires that you also
specify alignment for the table cells, otherwise they inherit their
alignment from the table.

Excellent! Thanks for the help. I guess I've got to specify
left-alignment for the text (or use CSS to do that).

Saw your tip on changing the template to automatically add DOCTYPE
when creating new pages in FrontPage. Thanks for that too!

Thanks to all that replied. I need to have a close look to see what
else DOCTYPE will do to my pages!

Regards,

--
Kulvinder Singh Matharu
Contact details : http://www.metalvortex.com/form/form.htm
Website : http://www.metalvortex.com/

"It ain't Coca Cola, it's rice" - The Clash
 

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