View Full Version : W3C validation problem

07-15-2007, 05:17 PM

This is question from a CSS newbie! My page (http://www.euanmorton.com/searcheuanmorton.com.htm) won't validate because <input> is not allowed within <table>.

Any tips on how to fix this ?

I've tried to get rid of the table and to use CSS instead, but as I have never done this before and haven't got a clue how to do it properly the only result I got is this:


It's valid..., but the positioning is quite far from the original page !!

Any help would be much appreciated.

Thanks !

07-16-2007, 09:51 AM
Excuse me?


Apart from the fact that the page in question is riddled with less favourable markup choices, it seems to validate just fine.
And yes, CSS is the preferred way to style your pages (including forms) over layout tables. If you would like to see a CSS style form example, take a look here (http://www.cssplay.co.uk/menu/form.html): not a table in sight! (You'll need to scroll down in the source a bit to this part: <h2>A form with style</h2>, after which the form's markup will follow).

07-16-2007, 01:48 PM

I finally found the problem and fixed it, which is why the page is now valid. It took me 2 days to realize that <input> was wrongly placed between </tr> and <tr> !!

Thanks for the link to the tableless form.

07-16-2007, 01:51 PM
the page in question is riddled with less favourable markup choices

As a newbie I would greatly appreciate more detailed comments on those less favourable choices !


07-16-2007, 02:41 PM
Everything thatís not semantic (http://www.boagworld.com/archives/2005/11/semantic_code_what_why_how.html) (i.e. doesnít make any sense in a given context) is not favorable, one of those things being tables to create a page layout.