My basic style sheet has a distinctive background and border for forms,
to make the structure clearer and to make it visually evident what
belongs to a form.
However, as people complained that some forms were odd-looking, I
noticed that indeed, fairly often the background is not applied and
there is empty space inside a form I didn't ask for. This was rather
puzzling until I realized that the observed cases seem to result from
one single "error" in my markup.
The "error" is lack of the "optional" </ptag right before a form. That
is,
<p>paragraph text
<form ...>
causes the trouble. For a simple illustration, check
on IE 7. (When </pis omitted, the background set for the form is not
there, except for a thin stripe at the top.)
For years, browsers have been reported to behave wrongly when "optional"
end tags for elements are omitted. But this form-related problem appears
even on IE 7, and I don't remember having seen notes about this
particular type of bug elsewhere. What did I miss?
My conclusion is that "optional" end tags should not be omitted. There
is little hope of having browsers fixed, I'm afraid. What we _can_ do is
to stop using "handy" SGML features like tag omissibility.
--
Jukka K. Korpela ("Yucca")
to make the structure clearer and to make it visually evident what
belongs to a form.
However, as people complained that some forms were odd-looking, I
noticed that indeed, fairly often the background is not applied and
there is empty space inside a form I didn't ask for. This was rather
puzzling until I realized that the observed cases seem to result from
one single "error" in my markup.
The "error" is lack of the "optional" </ptag right before a form. That
is,
<p>paragraph text
<form ...>
causes the trouble. For a simple illustration, check
on IE 7. (When </pis omitted, the background set for the form is not
there, except for a thin stripe at the top.)
For years, browsers have been reported to behave wrongly when "optional"
end tags for elements are omitted. But this form-related problem appears
even on IE 7, and I don't remember having seen notes about this
particular type of bug elsewhere. What did I miss?
My conclusion is that "optional" end tags should not be omitted. There
is little hope of having browsers fixed, I'm afraid. What we _can_ do is
to stop using "handy" SGML features like tag omissibility.
--
Jukka K. Korpela ("Yucca")
Comment