Solved

DOCTYPES are killing my career

Posted on 2007-03-23
1
238 Views
Last Modified: 2013-11-19
Hello, I am having some doctype trouble.  I'm trying to impliment a lightbox effect which requires a doctype of at least: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 

The page currently uses a doctype of <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">  

I admit I am a little unclear about which doctype to use for which situation, but when I change the doctype to the one that includes the link to loose.dtd, the formatting of my webpage becomes quite odd - I believe this is due to the way stylesheets are applied under different doctypes.  What I am trying to determine is if there is a doctype that will give me the best of both worlds.  The behavior with the loose.dtd link breaks in both Mozilla and IE 7 (not tested on any other browsers) but everything works like a charm (except the new lightbox stuff) when the loose.dtd part of the doctype is missing.  

Please help!!

Thanks!
0
Comment
Question by:johnjbarryjr
1 Comment
 
LVL 35

Accepted Solution

by:
mrichmon earned 500 total points
ID: 18782722
When you do not include the link to the standard declaration, then it is the same as no doctype - your browser enters quirks mode.

In quirks mode a browser can choose how to display the page - it does not have to follow any standards or behave in a consistent manner.


Therefore you should determine what is causing the issues of the formatting of your pages and fix that.  It can be fixed, but it is a change in learning how to apply styles correctly instead of depending on quirks mode of a browser
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question