Dreamweaver, IE, and FireFox - Web Design

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
User avatar
jqp
Posts: 5070
Joined: November 17th, 2004, 10:56 am
Location: In a box
Contact:

Post by jqp »

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

http://hsivonen.iki.fi/doctype/
King Arthur
Posts: 54
Joined: March 1st, 2005, 12:20 am
Location: Los Angeles, CA, USA

Post by King Arthur »

Actually, I'd use the Transitional doctype because the coders here in question aren't really experts of all things.

Code: Select all

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

Use that.
User avatar
peter.reisio
Posts: 3166
Joined: March 3rd, 2004, 6:57 pm
Contact:

Post by peter.reisio »

It doesn't really matter, then - either way they're sure to need the validator.
User avatar
jqp
Posts: 5070
Joined: November 17th, 2004, 10:56 am
Location: In a box
Contact:

Post by jqp »

King Arthur wrote:Actually, I'd use the Transitional doctype because the coders here in question aren't really experts of all things.

Code: Select all

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

Use that.

Why? Why not strict?

The Transitional DOCTYPE will, according to the chart, throw Konqueror into quirks mode, which probably doesn't matter to most people. However, I prefer to keep the Strict DOCTYPE since it is the "greenest" of all on that chart I linked to, and will won't cause you any problems, even with code created by Dreamweaver.

I really hope you didn't mean that remark the way I read it.
User avatar
peter.reisio
Posts: 3166
Joined: March 3rd, 2004, 6:57 pm
Contact:

Post by peter.reisio »

I think he meant that the people we're recommending doctypes to aren't really experts, so somehow a transitional doctype will be better for them since transitional is more lenient.

Doesn't make sense, but I believe that's what he meant. :)
User avatar
jqp
Posts: 5070
Joined: November 17th, 2004, 10:56 am
Location: In a box
Contact:

Post by jqp »

I've not seen dreamweaver use anything in Transitional that's not in Strict. Could be wrong.

I can point out that there's no way to make Dreamweaver default to strict (without creating your own template...) You can even make it default to XHTML Transitional but not strict. It may be doing that for a reason, but I've never seen it do anything out of the ordinary.
King Arthur
Posts: 54
Joined: March 1st, 2005, 12:20 am
Location: Los Angeles, CA, USA

Post by King Arthur »

Yeah, Peter really simplified what I was trying to say.
Personally, I think begining coders should try to first make clean and compatible code with the Transitional doctype, after they can do that they should (IF they want to) use the Strict doctype.
JaredM
Posts: 3826
Joined: November 14th, 2004, 4:41 am
Location: Alberta, Canada
Contact:

Post by JaredM »

I disagree, transitional encourages bad coding habits. Sure strict makes them have to work a little harder and may be a bit more frustrating in the beginning but thats better than them learning the wrong way to do things and later have to spend weeks redesigning a site because it doesn't work on a client's webbrowser.

As the saying going, an ounce of prevention is better than a pound of the cure.
I'm moving to Theory, everything works there.
Most issues are solved by going through the Standard Diagnostic
User avatar
jqp
Posts: 5070
Joined: November 17th, 2004, 10:56 am
Location: In a box
Contact:

Post by jqp »

If you're a beginner, why learn something one way, and then relearn it another way once you have a handle on it?

That's like teaching beginners "once you've got a handle on table layouts and font tags, I'll teach you CSS". In my experience, it's always easier to learn the right way (or at least, the permanent way) the first time.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

I'd like to note that you can still bungle everything up royally even if your code is validated strict.
User avatar
Cyberman
Posts: 325
Joined: December 18th, 2004, 2:06 pm

Post by Cyberman »

jinexile wrote:I disagree, transitional encourages bad coding habits.

For example?
HTML is defined by the W3C, not by a browser. <- I reject HTML5 for that reason. Making the fox guard the henhouse "because he's always been there anyway" isn't a good idea.
BMR777
Posts: 6
Joined: August 7th, 2005, 10:16 am
Contact:

Post by BMR777 »

jonnyq wrote:
BMR777 wrote:Actually:

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

With:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Made my pages look a hell of a lot better on FireFox. Cool!
BMR777

That is going to throw Firefox and other browsers into quirks mode.
Your results are going to be more consistent across browsers if you use a DOCTYPE that keeps all browsers in "standards" mode.


Actually, that is the only way that my site looks relatively the same between browsers. I had it the other way, using <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> and each browser went their own way. With the other code they actually look about 90% the same across browsers, so the code you are recommending actually has the opposite effect when using FireFox. All looks the same on IE.

BMR777
King Arthur
Posts: 54
Joined: March 1st, 2005, 12:20 am
Location: Los Angeles, CA, USA

Post by King Arthur »

How do you expect to code Strict compliant code when you first don't even know about clean code to begin with?
Moving from Transitional to Strict is nothing more than learning to dump a few tags and attributes, one should learn how to walk before he runs.

And what BMR posted is just what I mean, if the site looks bungled up in Transitional, it will look even more bungled up in Strict, he should start by learning how to code cleanly with the Transitional standards and then move onto Strict if he so wishes. There is nothing wrong with coding in Transitional because it is a standard just as much as Strict is.

And a note to BMR: If the site looks okay in Quirks Mode and bad in Standards Compliance Mode, you've got some problems in your code. I can understand Quirks Mode for IE because of the box model and whatnot, but by theory and proven facts, the site should look the same in Standards Mode, not Quirks.
User avatar
jqp
Posts: 5070
Joined: November 17th, 2004, 10:56 am
Location: In a box
Contact:

Post by jqp »

I honestly don't know what all Firefox does differently in standards mode vs. quirks mode. I do know some of the things that IE does differently between the two. Those differences may not be an issue in your situation. Generally speaking though, IE's standards mode and Firefox standards mode are much closer in similarity than IE's quirks mode and Firefox's quirks mode.

If quirks mode works for you in all relevant browsers, then fine, don't worry about it. However, if other problems crop up, the "fixes" may get more complicated.

At any rate, you could just as easily do what peter.reisio said in his first post. Add this between the <head> and </head> tags in the code:

Code: Select all

<style type="text/css>p { margin-bottom: 0; }</style>

It will solve the problem you referred to and won't cause any other problems.
JaredM
Posts: 3826
Joined: November 14th, 2004, 4:41 am
Location: Alberta, Canada
Contact:

Post by JaredM »

How do you expect to code Strict compliant code when you first don't even know about clean code to begin with?


Be expecting strict code you force the user to learn clean code, transitional you can code as sloppy as you want and it will often work in one or two browsers, then you get into situations where you see your site in another browser and wonder why it looks so horribly wrong and all. Then you come to a forum asking why it looks wrong and you're told everything you learned is wrong and you need to do it right.

Its like saying why do you expect beginning c/c++ coders to remember a ; at the end of their statements or adding the extra + to i+, to increment an integer, it should be more permissble because its easier. Then later when they're used to not putting that ; or + they notice thier 1 million line "Cross platform" program suite only works in the one linux distrobution they used for testing was because it was coded to handle those mistakes and works on no other OS.

It would be nice if the all browsers just spit out a validation error when there was a error like compilers do with compiled languages rather than try and idiot proof it... It would make browsers rendering faster, a lot of better websites out there and a lot less wanna-be webdesigners.
I'm moving to Theory, everything works there.
Most issues are solved by going through the Standard Diagnostic
Post Reply