XHTML/CSS jockeys? XHTML form validation errors?

Posted:
in Genius Bar edited January 2014
I recently have seen the light and have taken up the banner of standards compliant design - and in this vein I have redesigned my site using strict XHTML and CSS. The only issue is I am having validation errors when using a very simple form - one which seems to completely comply with XHTML 1.1 from all the references I can find - this kind of blows my "strict XHTML compliance" right out of the water - and is kind of embarrassing because I am linking to the XHTML and CSS validation pages from my site...



Here is the offending form:



Code:




<div id="styleMenu">

<h2><span>Style:</span></h2>

<form id="styleForm" method="post" action="/set_style.php">

<select name="style_id">

<option value="1">None</option>

<option value="2" selected="selected">Deconstruction</option>

</select>

<input type="submit" value="Switch" name="submit" />

<input type="hidden" name="referer" value="/imd.php" />

</form>

<p><a href="/css_explanation.php"><span>What is this?</span></a></p>

</div>









and you can see the validation errors here.



What is going on? It is saying that any <input> tag is invalid - which simply isn't the case in XHTML with either strict or transitional... It is also saying that I can't put a <select> tag inside my form - madness!



Any thoughts? Has W3.org gone completely wonky?



EDIT: clean up the pasted HTML

Comments

  • Reply 1 of 1
    Nevermind - problem solved.

    Putting a <fieldset> tag around anything in the form resolves the issue in a XHTML friendly way...

    Back to your regularly scheduled rumor-mongering...
Sign In or Register to comment.