June 20, 200917 yr Cant figure this out... http://validator.w3.org/check?uri=http%3A%...ine&group=0 Link to page: http://drumcornfarmcottage.co.uk/contact_us.html Any help apprectiated
June 20, 200917 yr By wrapping all the elements inside your <form> in a set of <p> tags, you are left with just one error; the one about the div. You can't enclose a div in <p> tags so you can either assign your id to the p tags (<p id="map">) or contain the p tags inside the div. It is basically all about block and inline elements in html. http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.3 - some more info for you on this. So your validated form could look like this: <form method="post" action="contactengine.php"> <p><label for="name">Name:</label> <input type="text" name="name" id="name" /> <label for="Tel"><i>Tel:</i></label> <input type="text" name="Tel" id="Tel" /> <label for="Email"><i>Email:</i></label> <input type="text" name="Email" id="Email" /> <label for="Location"><i>Location:</i></label> <input type="text" name="Location" id="Location" /> <label for="Message"><i>Message:</i></label><br /> <textarea name="Message" rows="20" cols="20" id="Message"></textarea> <input type="submit" name="submit" value="Submit" class="submit-button" /></p> </form> then your map div could be like this: <p id="map"><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></p> or this: <div id="map"><p><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></p></div> Hope this helps
June 20, 200917 yr Nice site! First off you need to wrap the form elements in a <fieldset> element. This is a required element for forms and xHTML strict. Also belt and braces approach would be to wrap the <label> around the <input> aswell (see here). As for the map, you don't need all of those line breaks. You can use CSS to target that div and set margins to space it apart from the other elements. Also you have not need to wrap it in a <p> element. For the address you should use an unordered list which you can then style in CSS but get the same effect. Also I'd check out jQuery to see if that helps. Also very minor point, but <i> isn't deprecated so can still technically be used, but given you've got CSS on the page there's no need to use it as { text-style: italic; } will work just as well. This should clean up your code a bit and help the validation issue. HTH?
Create an account or sign in to comment