NetTalk Central

Author Topic: Where to change DTD  (Read 2985 times)

malcolmg

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • Email
Where to change DTD
« on: October 22, 2010, 10:14:37 AM »
I am moving from Nettalk 4 to 5 and have a problem that is related to the DTD setting.  Where do I update the doctype?

Pages currently only have  <!DOCTYPE html>.

Thanks

Malcolm
 

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Where to change DTD
« Reply #1 on: October 23, 2010, 04:26:52 AM »
Hi Malcolm,

The new doctype is legal, and is the one recommended by the html 5 spec (and is backwards compatible). I'd be interested to know what the problem is you are getting. Ultimately it will be better to fix the problem, than fix the doctype in the long run.

However it is returned by the w3header method in the WebHandler - so you can add code there to return whatever you like as the doctype (do the return before the parent call.)

cheers
Bruce

malcolmg

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • Email
Re: Where to change DTD
« Reply #2 on: October 23, 2010, 11:36:25 AM »
Thanks Bruce

I actually found it this afternoon though it took a couple of tries to get the "packet = ...." as I am used to doing a sendpacket afterward a packet set, which in this case sends nothing not even the standard  DOCTYPE.

The reason for the change occurs within an html table.  A page from an third party uses a table to display a large image of 15 smaller images.  With the simplified <!DOCTYPE html> the cellspacing and/or cellpadding misbehaves.  This leaves a blank line between succeeding rows even with border=0 cellpadding=0 and cellspacing=0 when placed within the html code.  Nor does setting the CSS padding and margins work.  If you increase these they broaden the separating line but I cannot get it below what looks like a .5 gap.

By changing the DTD to HTML 4.01 or XHTML 1.0 the problem is resolved.

Regards

Malcolm