April 15, 200818 yr Hi people, I have all pages but one validating on this website, and I can't for the life of me work out what the w3c error msgs are trying to tell me? Has anyone got any ideas? Cheers Rich
April 15, 200818 yr Because you're using xhtml strict you need to have a space before the forward slash on self closing elements. For example, change this: <input type="submit" name="submit" value="Your Price" class="submit"/> <input type="hidden" name="submitted" value="TRUE"/> to this <input type="submit" name="submit" value="Your Price" class="submit" /> <input type="hidden" name="submitted" value="TRUE" />
April 15, 200818 yr Author Thanks for the tip but that doesn't seem to have solved it. I don't think that space is actually a requirement as such for XHTML. I just can't work out what is causing the error! I've checked my opening and closing elements, they appear to be fine...
April 15, 200818 yr Hi scaz, You need to wrap the inside of your form with a <fieldset> — that will solve your issue
April 15, 200818 yr Author Ahh that worked, thanks! I never knew <fieldset> was a required element of a form? I'm almost certain I have other forms validating on other websites without it?
April 15, 200818 yr Ah, but you've contained all your input elements within <p> tags. My previous statement was a little off (sorry!), it doesn't have to be contained inside a fieldset. I believe you can also contain your form elements in something like a <p>, it's just more semantically correct to have a fieldset in there anyway.
April 16, 200818 yr Hey on your blog did you get that IE Graph off my blog?? JakeBoyles.com Im j/w http://images.google.com/images?hl=en&...mages&gbv=2
April 16, 200818 yr Author Hey on your blog did you get that IE Graph off my blog?? JakeBoyles.com Im j/w What kip said ^, I can't remember who's blog it was off.
April 16, 200818 yr Because you're using xhtml strict you need to have a space before the forward slash on self closing elements.For example, change this: <input type="submit" name="submit" value="Your Price" class="submit"/> <input type="hidden" name="submitted" value="TRUE"/> to this <input type="submit" name="submit" value="Your Price" class="submit" /> <input type="hidden" name="submitted" value="TRUE" /> The extra space isn't required by XHTML. It's there only to make XHTML more compatible with older HTML browsers. Ideally it should not be there.
April 16, 200818 yr Ahh that worked, thanks! I never knew <fieldset> was a required element of a form? I'm almost certain I have other forms validating on other websites without it? The basic funda is you have to embed the input field inside a block-level element, if you embed that inside an inline element you will get an error too.
Create an account or sign in to comment