The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Strict vs. Transitional Doctypes
jimlongo
post Sep 29 2006, 03:28 PM
Post #1


This is My Life
*******

Group: Members
Posts: 1,125
Joined: 24-August 06
From: t-dot
Member No.: 16



So I've read numerous times why i would want to use a strict doctype.
http://hsivonen.iki.fi/doctype/
So I thought I'd give it a go and change some doctype declarations on my pages and see what happens. I didn't get very far.

Take this simple entry page to my website. It uses a transitional doctype and on a Mac it all looks fine. A solid image generated by slices in a table. Note - there is music automatically playing so for those that are allergic to such a thing turn down your speakers (although if you have javascript disabled you won't have to worry)
here is the site with a transitional doctype - http://rdiv.com

Here is the same page with a strict doctype . . . http://rdiv.com/index2
On every mac browser it is as if there is all kinds of whitespace in the table generating the image. There isn't any whitespace. There isn't anything fancy here, I added a simple in-line style declaration but it doesn't seem to matter. It's just the table with some rollovers.

What is it that breaks these pages?
Is this the case on Windows as well?
Am I overlooking something simple - what standard am I breaking?


Thanks in advance for your time.
Jim




User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 29 2006, 03:53 PM
Post #2


.
********

Group: WDG Moderators
Posts: 8,043
Joined: 10-August 06
Member No.: 7



QUOTE(jimlongo @ Sep 29 2006, 10:28 PM) *

So I've read numerous times why i would want to use a strict doctype.
http://hsivonen.iki.fi/doctype/


Digression: personally I prefer the terms std mode and quirks mode doctype, since the following transitional doctypes puts most browsers (except Konqueror) in std mode:

CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


QUOTE
What is it that breaks these pages?


It might be http://developer.mozilla.org/en/docs/Image...Mysterious_Gaps

QUOTE

Is this the case on Windows as well?


I see gaps in FF and Opera but not IE.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 29 2006, 04:13 PM
Post #3


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,134
Joined: 9-August 06
Member No.: 6



QUOTE(jimlongo @ Sep 29 2006, 10:28 PM) *

Thanks in advance for your time.


You are welcome! laugh.gif

Christian speaks the truth. Strict Mode is a misnomer. Basically a complete doctype with a URL triggers Standards Mode.

Have to rush. It's Friday and I'm out carousing. IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 29 2006, 04:31 PM
Post #4


WDG Member
********

Group: Root Admin
Posts: 8,289
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Yes, there really are two issues. Henri Sivonen's article talks about choosing a doctype declaration that triggers the desired rendering mode (standards, almost standards, or quirks).

The Strict vs Transitional issue is more or less independent of the rendering mode issue.

Regarding the OP's site, if you're going to stick with old design styles (images glued together with tables, linked images and images of text with no ALT text), then go ahead and stick with old markup. If you're going to upgrade to newer markup, then you should move to real text and flexible CSS-based designs as well.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jimlongo
post Sep 30 2006, 05:16 PM
Post #5


This is My Life
*******

Group: Members
Posts: 1,125
Joined: 24-August 06
From: t-dot
Member No.: 16



QUOTE
QUOTE
QUOTE
What is it that breaks these pages?

It might be http://developer.mozilla.org/en/docs/Image...Mysterious_Gaps

Thanks for that, this fixes this table based design in all these standards compliant browsers I have. Funny that the one that didn't have a problem with this was the non-standards compliant Explorer. Could you please tell me if this still renders okay in Windows Explorer (without any white spaces). http://rdiv.com/index3

I guess part of this exercise illustrates a point I think we need to be more careful with. Often I see recommendations here to use a strict doctype, thus triggering standard mode (I get the semantics biggrin.gif ) for designs that clearly that mode is going to cause troubles with. And wishing that a lot of these pages would be built with a more modern CSS approach is really wishful thinking at this point in many peoples development.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 30 2006, 05:35 PM
Post #6


.
********

Group: WDG Moderators
Posts: 8,043
Joined: 10-August 06
Member No.: 7



QUOTE(jimlongo @ Oct 1 2006, 12:16 AM) *

Could you please tell me if this still renders okay in Windows Explorer (without any white spaces). http://rdiv.com/index3


Looks OK in IE6. Now that I listened to the music it sounds nice too. smile.gif

QUOTE
I guess part of this exercise illustrates a point I think we need to be more careful with. Often I see recommendations here to use a strict doctype, thus triggering standard mode (I get the semantics biggrin.gif ) for designs that clearly that mode is going to cause troubles with.


But what else can you do? You'll never learn proper CSS with a quirksmode (or even an almost-std) DTD. And with a quirksmode DTD you'll get even more different results in different browsers. You'll also get problems with table layouts in quirksmode, like inheritance:

CODE
div {
color: red;
}

<div>
<table>
<tr>
<td>DIV color is not inherited in Windows IE5 or IE6/quirksmode</td>
</tr>
</table>
</div>


User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jimlongo
post Sep 30 2006, 05:59 PM
Post #7


This is My Life
*******

Group: Members
Posts: 1,125
Joined: 24-August 06
From: t-dot
Member No.: 16



Okay thanks for that one . . . I'm going to try converting more of my pages in the next little while and see how painful painless that might be.

This post has been edited by jimlongo: Sep 30 2006, 06:02 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 30 2006, 10:11 PM
Post #8


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,134
Joined: 9-August 06
Member No.: 6



Don't let them discourage you. rolleyes.gif Standards Mode is easier and so is using a Strict doctype. I joke you not. As Darin said, less browser differences and also fewer things to keep track of. That's the truth. smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 20th February 2019 - 04:51 AM