Markus Ernst wrote:
<snip>Markup example with improperly nested form</snip>
[color=blue]
> And due to improper nesting this does not validate.
> Note that form 2 is the reason why I can't span the form
> over the whole body, which would make it validate without a problem.[/color]
There are never any occasions where you need improper nesting of
elements like you had, and doing so is exceptionally bad because, even
though current browsers can handle it as tag soup, it is handled very
differently in different browsers, and sometimes causes very different
results. So, you can never be sure what you'll get with improperly
nested elements in different browsers, unless you test them all, but it
should never be done anyway.
I suggest you think a little more about your document structure. They
were two seperate forms, so mark them up as that. If half of form one
was appearing in a seperate section, then that's most likely for
presentational reasons, I can't imagine any structural or semantic
reason to do so. You should also be able to remove a few of those
<div>s, and just apply styles directly to the form element. You should
generally avoid overusing divs, since they have no semantics, and often
serve to unnecessarily bloat your code, so use them sparingly.
[color=blue]
> Now in the early days I learnt that forms could begin and end inside or
> outside any element, regardless of the layout or table structure. Is this
> just outdated[/color]
It's not just outdated, it was never valid. It just means you were
taught by an ignorant teacher, or from a poorly written book.
--
Lachlan Hunt
http://lachy.id.au/ http://GetFirefox.com/ Rediscover the Web
http://SpreadFirefox.com/ Igniting the Web