Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Footer & DOCTYPE

Reply
Thread Tools

Footer & DOCTYPE

 
 
Matthias Gutfeldt
Guest
Posts: n/a
 
      12-04-2003
Jukka K. Korpela wrote:
> Steve Pugh <(E-Mail Removed)> wrote:
>
>
>>Or if you want to carry on telling lies you can change the doctype to
>>one that triggers quirks mode rather than standards mode

>
>
> Alternatively, if you wish to tell the truth and you wish to use a
> doctype declaration, you can create your copy of the Transitional DDT,
> add a line that tells that a table element may have a height attribute,
> upload the DTD onto a Web server, and refer to it your <!doctype>.
>
> I'm pretty sure this will trigger "bug compatible" (aka. "quirks") mode
> in current bwowsers.


It depends. If you advertise the fact that it's your own DTD in the
Doctype Declaration, it might trigger Standard mode, since any
unrecognized Doctype triggers "Standard" mode, at least according to the
browser documentation and my own tests:
<http://gutfeldt.ch/matthias/articles/doctypeswitch/table.html>

So one would either have to use a W3C HTML Doctype (which might be seen
as 'lying'), or with a bit of care create a custom Doctype Declaration
that isn't recognized as "unknown".


Matthias

 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      12-04-2003
"Nico Schuyt" <(E-Mail Removed)> wrote:
>DU wrote:
>>Goran Topic <(E-Mail Removed)> wrote:
>>>
>>> Hello. I'm trying to make a footer, and I tried this (our site uses
>>> table-based layout; don't kill me, please):
>>> <table width="100%" height="100%">
>>> <snip>
>>> </table>
>>> And this works as I want it to: if the page is longer than the
>>> screen, the footer goes at the bottom of the document; and if it's
>>> shorter, it goes on the bottom of the screen. However, if I put the
>>> DOCTYPE declaration, it does not work any more:

>
>> Why didn't you just use entirely valid code in a tableless webpage
>> design? This is where your markup code and design will work on a
>> multitude of web-aware devices, platforms, compliant browsers, etc..

>
>Well, I'm not so sure about that
>http://www.nicoschuyt.nl/test/footer.htm is an example of a tableless
>solution for scrollable text with footer.
>Bad keyboard navigation however and in browsers like Opera7.2 and Mozilla1.4
>the scroll mouse is inactive.


However, the OP didn't ask for a fixed footer, but one that went to
the either the end of the window or the end of the content depending
on the amount of content. This is doable with CSS and doesn't seem to
screw up scrolling in any browser I have available for testing:

http://steve.pugh.net/test/test57.html (long content)
http://steve.pugh.net/test/test57a.html (short content)

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
 
 
 
Nico Schuyt
Guest
Posts: n/a
 
      12-04-2003
brucie wrote:
> Nico Schuyt said:


>> http://www.nicoschuyt.nl/test/footer.htm is an example of a tableless
>> solution for scrollable text with footer.


> a simpler solution would have just been to position a <div> at the
> bottom of the window (or anywhere else you wanted it) with
> position:fixed; so it remains in the location while everything else
> scrolls.
> easy peasy except once again for IE. you'll need the position fixed
> fix. http://devnull.tagsoup.com/fixed/


Much simpler indeed. Thanks!!
Nico



 
Reply With Quote
 
Nico Schuyt
Guest
Posts: n/a
 
      12-04-2003
Steve Pugh wrote:

> However, the OP didn't ask for a fixed footer, but one that went to
> the either the end of the window or the end of the content depending
> on the amount of content. This is doable with CSS and doesn't seem to
> screw up scrolling in any browser I have available for testing:
> http://steve.pugh.net/test/test57.html (long content)
> http://steve.pugh.net/test/test57a.html (short content)


Perfect!
Nico


 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      12-04-2003
Eric Bohlman <(E-Mail Removed)> wrote:

>> Alternatively, if you wish to tell the truth and you wish to use a
>> doctype declaration, you can create your copy of the Transitional
>> DDT,

>
> Wasn't it Tina Marie Holmboe who, several years ago, wrote a parody
> of the Ramones' "Teenage Lobotomy" that began with "DTD did a job
> on me"?


I swear by SGML and XML and the holy W3C that "DDT" was an
unintentional typo. Consult "Psychopathologie des Alltagslebens" for a
background explanation.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      12-04-2003
Matthias Gutfeldt <(E-Mail Removed)> wrote:

>> I'm pretty sure this will trigger "bug compatible" (aka. "quirks")
>> mode in current bwowsers.

>
> It depends. If you advertise the fact that it's your own DTD in the
> Doctype Declaration, it might trigger Standard mode, since any
> unrecognized Doctype triggers "Standard" mode, at least according
> to the browser documentation and my own tests:
> <http://gutfeldt.ch/matthias/articles/doctypeswitch/table.html>


Excuse me while I get mad.

And sorry for making guesses on the basis of what would have made at
least _some_ sense, instead of checking what bwowser vendors actually
did. Incidentally, it seems that your article is blank (white) for
Netscape 6 as regards to the mode when an "unrecognized" doctype is
used - at least Netscape 7.1 seems to follow the crowd, in doing just
the absurd thing: if I declare a doctype in a manner that definitely
violates HTML specifications (even if I in fact thereby refer to a DTD
that is a verbatim copy of a DTD listed in a specification), the
doctype sniffer decides to switch to "standards" mode.

> So one would either have to use a W3C HTML Doctype (which might be
> seen as 'lying'), or with a bit of care create a custom Doctype
> Declaration that isn't recognized as "unknown".


Quite interesting options, are they not? So the logical conclusion is
that the need for declaring a doctype (when you actually want "quirks"
mode) is nonexistent, except if company police requires it. After all,
the doctype has two effective meanings:
a. For SGML validators, as well as some of their imitations, the
doctype declaration is a way of expressing the intended syntax
in a manner that allows automatic verification. But the author
can of course submit a modified copy, which contains a suitable
doctype.
b. Browsers play their games, in different ways, modifying the rules
of the game in a Calvinball-like manner. But if quirks mode is what
you want, omission of any doctype seems to be the best method
(at present at least).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Matthias Gutfeldt
Guest
Posts: n/a
 
      12-04-2003
"Jukka K. Korpela" schrieb:
>
> Matthias Gutfeldt <(E-Mail Removed)> wrote:
>
> >> I'm pretty sure this will trigger "bug compatible" (aka. "quirks")
> >> mode in current bwowsers.

> >
> > It depends. If you advertise the fact that it's your own DTD in the
> > Doctype Declaration, it might trigger Standard mode, since any
> > unrecognized Doctype triggers "Standard" mode, at least according
> > to the browser documentation and my own tests:
> > <http://gutfeldt.ch/matthias/articles/doctypeswitch/table.html>

>
> Excuse me while I get mad.


Take your time. Just ring the bell when you're finished smashing the
furniture and dishes .


> Incidentally, it seems that your article is blank (white) for
> Netscape 6 as regards to the mode when an "unrecognized" doctype is
> used


Yes. IIRC I forgot to test it before I banished NN6 from my computer.


> - at least Netscape 7.1 seems to follow the crowd, in doing just
> the absurd thing: if I declare a doctype in a manner that definitely
> violates HTML specifications (even if I in fact thereby refer to a DTD
> that is a verbatim copy of a DTD listed in a specification), the
> doctype sniffer decides to switch to "standards" mode.


Absolutely. This particular problem illustrates nicely that Doctype
Switch is not only a bad idea, it's also very badly executed.

Add to this the two following simple observations:

a) Many authors don't even know about this "feature", and accidently
trigger "Standard" mode although their document is confused tag-soup, or
"Quirks" mode although their document follows the specification
b) Some browsers introduced errors in "Quirk" mode-capable browser that
they never had in previous versions (Opera,
<http://www.opera.com/docs/specs/doctype/>)

It becomes clear, at least to me, that the Doctype Switch should be
abolished as soon as possible.


Matthias
 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      12-04-2003
Jukka K. Korpela wrote:

> the absurd thing: if I declare a doctype in a manner that definitely
> violates HTML specifications (even if I in fact thereby refer to a DTD
> that is a verbatim copy of a DTD listed in a specification), the
> doctype sniffer decides to switch to "standards" mode.


To be honest that makes perfect sense to me -- it allows the browser to
display a theoretical "HTML 5.0"[1] document in standards mode.

[1] or any possible future HTML-like markup language.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Newbie - CSS Works With Invalid DOCTYPE. Fails With Valid DOCTYPE. Larry Lindstrom HTML 19 06-12-2012 02:07 PM
Any way to reorder how a datagrid is drawn (header/footer/items vs.header/items/footer)? Henrik ASP .Net Datagrid Control 1 07-06-2006 12:23 AM
DOCTYPE declarations not generated by ASP.NET Neil Zanella ASP .Net 3 01-04-2005 11:18 PM
Setting DocType in Asp.Net Kenneth Keeley ASP .Net 1 06-30-2004 01:59 PM
vs.net creates doctype wrong? Ian ASP .Net 2 06-21-2004 12:32 PM



Advertisments