Forum Moderators: open
I'm using asp.net with ms vwd(if this is relevant).
i have 2 questions :
1. when i add a dtd higher then 3.0 vertical align stop working, any reasone why?
2. when iis compiles the pages i write, it adds unnecessary stuff to the page whice causes it not to validate :
it add border=0 to images.
and it adds a name attribute to the form.
is there any way to fix these problems?
Thanks
For your first question, the presence or absence of a doctype shouldn't alter the vertical align properties of a table cell, but there are some differences in the way cell heights are handled when you use a recent doctype. See Quirks Mode vs. Standards Mode [webmasterworld.com] for some more information. Try using the following doctype which triggers quirks mode:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> For your second question, earlier ASP.NET has a reputation for generating invalid markup, in particular extra attributes and font tags. If you stick to HTML 4.01 Transitional, the markup errors will be few and far between, and unrecognized attributes are not really much of a problem. It may be impossible to fully validate when using .NET unless you are using the latest version (which I believe is supposed to generate valid XHTML 1.0 Transitional syntax).