Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DOCTYPES are killing my career

Posted on 2007-03-23
1
Medium Priority
?
246 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 2000 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

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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 elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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…

705 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