Solved

DOCTYPES are killing my career

Posted on 2007-03-23
1
227 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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
jquery, html5 UI 1 46
PDF to HTML conversion that looks good on Android Phones 3 51
HTML5 and Javascript 3 36
Tag input html 4 35
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now