Hopefully Murray or someone else with a lot of knowledge sees
this. I’m giving my site an update and I’m trying to figure out
some things with XHTML 1.0 Strict. Now I’ve been running the
following page through the validator:
http://www.parkwaygaming.com/index2.php
Now what fails validation is an error like:
“document type does not allow element X here, missing one of
…..”
Now these all appear within <form> tags. Is there a
reference or an explanation you can give to explain what the
difference is between a form written in Strict and one written in
Transitional? I’m trying to figure out why the forms don’t validate
when the form tag exists, but when they are removed, it validates.
I know I’m missing something but I just can’t seem to understand
what is missing.|||
Just for grins, try putting a <fieldset> tag around
those elements.
–
Murray — ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don’t LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com – DW FAQs,
Tutorials & Resources
==================
“SnakEyez02″ <webforumsuser@macromedia.com> wrote in
message
news:g5on52$sf8$1@forums.macromedia.com…
> Hopefully Murray or someone else with a lot of knowledge
sees this. I’m
> giving
> my site an update and I’m trying to figure out some
things with XHTML 1.0
> Strict. Now I’ve been running the following page through
the validator:
>
>
http://www.parkwaygaming.com/index2.php
>
> Now what fails validation is an error like:
>
> “document type does not allow element X here, missing
one of …..”
>
> Now these all appear within <form> tags. Is there
a reference or an
> explanation you can give to explain what the difference
is between a form
> written in Strict and one written in Transitional? I’m
trying to figure
> out
> why the forms don’t validate when the form tag exists,
but when they are
> removed, it validates. I know I’m missing something but
I just can’t seem
> to
> understand what is missing.
>
|||
Well that’s stupid. I really need to put those tags inside a
form now?
I tried the fieldset but it put a border around the area. Is
there a way to control that?
Otherwise I put an empty div tag around it (no attributes
assigned whatsoever) and that seemed to make it validate as well.
Is either technically right, or should I be controlling a
fieldset with CSS?|||
.oO(SnakEyez02)
>Well that’s stupid. I really need to put those tags
inside a form now?
You can also use a div or some other block-level element. The
specs for
the strict standards (not only XHTML, but also HTML Strict)
require to
use block-level elements in some cases where the loose
standards also
allowed inline-level elements. Another example for this
requirement is
the ‘body’ element:
<body>foo</body>
would be invalid in Strict, because ‘body’ only allows
block-level
content.
> I tried the fieldset but it put a border around the
area. Is there a way to
>control that?
The whole purpose of a fieldset is to logically _and_
visually group
form elements together.
> Otherwise I put an empty div tag around it (no
attributes assigned whatsoever)
>and that seemed to make it validate as well.
Exactly.
> Is either technically right, or should I be controlling
a fieldset with CSS?
Also possible, dependent on the structure of your form.
You could have a look at the main page of the W3 validator
for an
example of what could easily be done with a complex form,
structured
with fieldsets and some little unobtrusive JavaScript. Check
the same
page again with disabled CSS to see the “real” HTML
structure.
Micha
Related posts:
- Flash with XHTML STRICT
- xhtml Strict
- Form sticking out of liquid 3-column layout
- Table with slices from FW broken in HTML 4.01 strict
- Library items and XHTML
Related posts brought to you by Yet Another Related Posts Plugin.