HighDots Forums  

XHTML 1.0 Strict Form Help

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss XHTML 1.0 Strict Form Help in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
SnakEyez02
 
Posts: n/a

Default XHTML 1.0 Strict Form Help - 07-17-2008 , 08:12 PM






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.


Reply With Quote
  #2  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: XHTML 1.0 Strict Form Help - 07-17-2008 , 08:15 PM






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 (AT) macromedia (DOT) com> wrote

Quote:
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.



Reply With Quote
  #3  
Old   
SnakEyez02
 
Posts: n/a

Default Re: XHTML 1.0 Strict Form Help - 07-17-2008 , 08:42 PM



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?


Reply With Quote
  #4  
Old   
Michael Fesser
 
Posts: n/a

Default Re: XHTML 1.0 Strict Form Help - 07-18-2008 , 02:12 AM



..oO(SnakEyez02)

Quote:
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.

Quote:
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.

Quote:
Otherwise I put an empty div tag around it (no attributes assigned whatsoever)
and that seemed to make it validate as well.
Exactly.

Quote:
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.

http://validator.w3.org/

Micha


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.