Solved

DOCTYPES are killing my career

Posted on 2007-03-23
1
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hide and Unhide Table 6 42
Hta File displays dynamic File names 4 65
allow link tag to be submit like form 15 60
HTML CSS and  Table design 4 70
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.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

752 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