NYCPHP Meetup

NYPHP.org

[nycphp-talk] And the HTML guru is....

tedd tedd at sperling.com
Tue Jan 9 10:19:56 EST 2007


At 9:46 PM -0500 1/4/07, Greg Rundlett wrote:
>On 1/4/07, Kenneth Downs <ken at secdat.com> wrote:
>>Hi folks,
>>
>>A helpful HTML guru has given me the solution to my height-dont-work
>>problem in IE 6.
>>
>>The guru is.... (drumroll)  Tom Melendez of LIPHP fame.  He pointed out
>>that changing the document type declaration to "quirks" mode makes IE
>>work, instantly fixing the problem.
>>
>>For completeness, here is a simplified snipeet that illustrates the
>>fixed situation:
>>
>><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>><html>
>><head>
>>    <style>
>>    html, body {
>>       height: 100%;
>>       width: 100%;
>>       margin: 0px;
>>    }
>>    </style>
>></head>
>><body>
>><center>
>>    <table cellspacing=0
>>           style="width: 500px; height: 100%;">
>>    <tr><td style="height: 100px" bgcolor=red>a </td></tr>
>>    <tr><td>hello </td></tr>
>>    <tr><td style="height: 100px" bgcolor=blue>b </td></tr>
>>    </table>
>></center>
>></body>
>>
>>
>
>
>I don't mean to be picky, but if you post a 'solution' then it ought
>to be or attempt to be syntactically correct.  The simple snippet
>above gets lazy about quoting attributes, ending semi-colons and the
>type attribute is even missing from the <style> tag not to mention a
>missing </html> tag.  Your point is made about doctype declarations,
>but the code example would lead a newbie to believe that tag soup is
>acceptable to 'gurus'.  All I had to do to produce the version below
>was run it through tidy -im -ashtml /tmp/tmp.html
>
>-snip-
>
>Greg

Hi all:

In addition, I don't mean to be picky either, but the example is: a) 
using a table to display other than table stuff; b) embedding css 
(nothing really wrong with it other than it could be made 
unobtrusive); c) placing design attributes within tags, which 
certainly belong in a css file; d) and, has an incomplete DOCTYPE.

It's hard to do build something strong, when you have a poor foundation.

tedd

-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the talk mailing list