Solved

DOCTYPES are killing my career

Posted on 2007-03-23
1
237 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

856 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