Forum Moderators: mack

Message Too Old, No Replies

doctype and subsequent unexpected changes in FP 2003 website

         

bridget

6:43 am on Apr 5, 2006 (gmt 0)

10+ Year Member



Based on a recommendation on a FrontPage-oriented website, I copied the following doctype onto each page on the website I am developing with FrontPage 2003:

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

I don't understand the results. For example, on some pages (not all), text is now centered, rather than left-justified (this only occurs in Explorer—not Netscape Navigator or Firefox). On other pages, cell margins and/or padding have changed. Sometimes the vertical alignment of text within cells has changed.

This is my first website--it consists of basic HTML tables linked to a CSS that specifies font characteristics (headings, hyperlinks, several “class” definitions, lists, etc).

Should I be using a different doctype? Is there something in my code that could cause this—if so, where should I look? Unfortunately, I can’t simply show you the site because I haven’t yet published it.

I would appreciate any suggestions/words of wisdom.

Thanks,
Bridget

Wlauzon

8:20 am on Apr 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am still trying to get the DOCTYPES vs other header stuff totally figured out myself, but I recall reading here someplace that you should also have something like the META tag in the head for correct rendering. Below is part of what we use now for example:

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

<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> ****
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" href="stylesheet1.css" type="text/css" media="screen" />

bridget

2:18 am on Apr 6, 2006 (gmt 0)

10+ Year Member



Thank you for the info.

I tried using the "strict" doctype and I also copied your charset over the "Windows 1250" in my file. Unfortunately, neither made any difference.

Having looked at things more closely, it seems that my problem only occurs with Explorer, so I'll try search this site for info re doctype and Explorer.

Bridget

encyclo

2:23 am on Apr 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are retro-fitting a doctype to an existing site built with tables and no doctype, then it is probably best to use this doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

The above doctype (without the URL) will allow you to validate your pages to pick up errors without switching the rendering mode. For more information, see Quirks Mode vs. Standards Mode [webmasterworld.com]. Using Standards Mode is ideal in the longer term, but it is best to stick with quirks mode for existing pages that you are tidying up - you can switch later to the full doctype in your initial post.

Note that you should be careful with switching the charset, and you should not use trailing slashes as indicated in the message above for your meta elements.

You can validate your pages with the HTML validator [validator.w3.org]. :)

Added: Another thread you might find useful: Meta tags and more - from <head> to </head> [webmasterworld.com]