Gossamer Forum
Home : Products : Gossamer Links : Discussions :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Quote Reply
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Can anyone tell me what this first line of code is for and why we need it in the LSQL templates?

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I have discovered (after hours of tweaking luna) that it is this line of code that is making subtle differences to other parts of the site that don't have it - i.e. GCommunity. Once added to GComm the site maintains it's uniformity.

The bottom line (or should that be top line) is, do we need it or not?

I've found a list of these codes HERE but can't find a "Dummies Guide" explanation anywhere.

Unsure

( EDIT: Just seen the sticky at the top of this forum but still none the wiser )

Last edited by:

MJB: Mar 28, 2006, 1:00 PM
Quote Reply
Re: [MJB] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> In reply to
Here's a page that describes it: http://www.webstartcenter.com/howto/dtd.php

What you're seeing is the browser's two rendering modes: quirks mode and standards compliance mode. When you specify a DTD (there are exceptions for IE), it puts the browser in standards compliance mode and with IE this means it uses a different box model as well as a few other differences.

The luna template set has been designed to be XHTML 1.0 transitional compliant (well as much as possible), so if you do remove it, it will result in some layout breaking due to IE using the incorrect box model (eg. with IE's quirks mode box model, the width property includes the border and padding, while the standards compliant box model doesn't).

Adrian
Quote Reply
Re: [brewt] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> In reply to
I've linked luna.css through GComm and some external pages so this explains the slight differences. Once I added the code to the other pages they straightened out.

Thanks for the insight but I'll leave well alone. If it ain't broke.......