jasonc Posted January 27, 2010 Share Posted January 27, 2010 I have tried to tidy up my code but get 42 errors with the validator which i do not understand. please can someone check out my code and tell me where i am going wrong. the following link is where i have uploaded my template. http://roundshaw.co.uk/sc/1.html these are the errors w3c shows... # Error Line 56, Column 35: document type does not allow element "div" here; assuming missing "li" start-tag <div align="center"><strong>20 Jan 2010<br />7:30 pm</strong></d… # Error Line 57, Column 19: end tag for "li" omitted, but OMITTAG NO was specified </ul> You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". # Info Line 56, Column 15: start tag was here below is my code at this page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" > <head> <link rel="shortcut icon" href="fav.ico" type="image/x-icon" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Forum</title> <meta name="keywords" content="Forum" /><meta name="ROBOTS" content="INDEX, FOLLOW" /><meta name="revisit-after" content="1 day" /><meta name="description" content="Forum" /><meta name="author" content="Forum" /><meta name="copyright" content="�2009-2010" /><meta name="rating" content="Safe For Kids" /><meta name="page-type" content="Non-profit" /><meta name="audience" content="All" /><meta name="expires" content="mon, 25 Jan 2010" /><link rel="stylesheet" href="template.css" type="text/css" /> <style type="text/css"> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan;font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} span.GramE {mso-style-name:""; mso-gram-e:yes;} @page Section1 {size:595.3pt 841.9pt; margin:2.0cm 2.0cm 2.0cm 2.0cm; mso-header-margin:35.45pt; mso-footer-margin:35.45pt; mso-paper-source:0;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:1676226283; mso-list-type:hybrid; mso-list-template-ids:1195433162 134807567 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;} @list l0:level1 {mso-level-tab-stop:36.0pt; mso-level-number-position:left; text-indent:-18.0pt;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} --> </style> </head> <body id="page_bg" style='tab-interval:36.0pt'> <div id="header"><div id="logo"><a href=""><font size="6">Forum</font></a></div></div> <div id="content_top"></div> <div class="center"> <div id="wrapper"> <div id="gradient"> <div class="pill_m"><div id="pillmenu"></div></div> <div class="clr"></div> <div id="content"> <div id="leftcolumn"> <div class="module_menu"><h3>Main Menu</h3> <ul class="menu"><li><a href=""><strong>Home</strong></a></li><li><a href=""><strong>Meetings</strong></a></li><li><a href=""><strong>Events</strong></a></li><li><a href=""><strong>Gallery</strong></a></li><li><a href=""><strong>Membership</strong></a></li><li><a href=""><strong>About us <font size="1pt">>></font></strong></a></li><li><a href=""><strong>Purpose</strong></a></li><li><a href=""><strong>How to join</strong></a></li><li><a href=""><strong>Contact us</strong></a></li></ul> </div> <br /> <div class="module"><h3><font size="2">Recent updates</font></h3><font size="2">Agenda</font> <ul class="latestnews"><li style="float: right;"><a href=""><strong>20 Jan 2010</strong></a> <a href=""><strong>view items</strong></a></li><li style="float: right;"><a href=""><strong>download all</strong></a></li> </ul> <br /><br /><br /><font size="2">Minutes</font> <ul class="latestnews"><li style="float: right;"><a href=""><strong>21 Oct 2009</strong></a>*TBA</li></ul> <br /><br /><h3><font size="2">Next meeting</font></h3> <ul class="latestnews"> <div align="center"><strong>20 Jan 2010<br />7:30 pm</strong></div> </ul> <br /><br /><br /><br /><br /><br /><br /><br /><br />*TBA (to be agreed) </div> </div> <div id="maincolumn"> <div class="nopad"> <table class="contentpaneopen"> <tr> <td valign="top" colspan="2" height="300"><br /><br /><br /> </td> </tr> <tr> <td valign="top" colspan="2"> </td> </tr> </table> </div> <div class="clr"></div> </div> </div> </div> <div id="content_bottom"></div> </div> </div> <div id="footer"> <div><a href="" style="text-decoration: none;">disclaimer</a></div> </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
Mchl Posted January 27, 2010 Share Posted January 27, 2010 <ul> starts unordered list, and only <li> elements can be it's childredn <ul class="latestnews"> <li><div align="center"><strong>20 Jan 2010<br />7:30 pm</strong></div></li> </ul> Quote Link to comment Share on other sites More sharing options...
jasonc Posted January 27, 2010 Author Share Posted January 27, 2010 hey thanks for that and the text stayed in the center ;-) i have the menus that seem to kick up a fuss now when the indented menu is diaplayed... this seems to follow the same as before <ul><li>.....</li></ul> do you know why does this not work <ul class="menu"> <li><a href="/"><strong>Home</strong></a></li> <li><a href="?ac=pi"><strong>Previous meetings</strong></a></li> <li><a href="?ac=e"><strong>Events</strong></a></li> <li><a href="?ac=g"><strong>Gallery</strong></a></li> <li><a href="?ac=m"><strong>Membership</strong></a></li> <li><a href="?ac=au"><strong>About us <font size="1pt">>></font></strong></a></li> <ul><li><a href="?ac=auar"><strong>Annual report</strong></a></li></ul> <ul><li><a href="?ac=auec"><strong>Executive Committee</strong></a></li></ul> <ul><li><a href="?ac=aumt"><strong>Meetings</strong></a></li></ul> <ul><li><a href="?ac=aump"><strong>this</strong></a></li></ul> <ul><li><a href="?ac=aumb"><strong>Membership</strong></a></li></ul> <li><a href="?ac=pu"><strong>Purpose</strong></a></li> <li><a href="?ac=j"><strong>How to join</strong></a></li> <li><a href="?ac=c"><strong>Contact us</strong></a></li> </ul> Quote Link to comment Share on other sites More sharing options...
lostprophetpunk Posted January 27, 2010 Share Posted January 27, 2010 <ul class="menu"> <li><a href="/"><strong>Home</strong></a></li> <li><a href="?ac=pi"><strong>Previous meetings</strong></a></li> <li><a href="?ac=e"><strong>Events</strong></a></li> <li><a href="?ac=g"><strong>Gallery</strong></a></li> <li><a href="?ac=m"><strong>Membership</strong></a></li> <li><a href="?ac=au"><strong>About us <font size="1pt">>></font></strong></a></li> <ul><li><a href="?ac=auar"><strong>Annual report</strong></a></li></ul> <ul><li><a href="?ac=auec"><strong>Executive Committee</strong></a></li></ul> <ul><li><a href="?ac=aumt"><strong>Meetings</strong></a></li></ul> <ul><li><a href="?ac=aump"><strong>this</strong></a></li></ul> <ul><li><a href="?ac=aumb"><strong>Membership</strong></a></li></ul> <li><a href="?ac=pu"><strong>Purpose</strong></a></li> <li><a href="?ac=j"><strong>How to join</strong></a></li> <li><a href="?ac=c"><strong>Contact us</strong></a></li> </ul> Problem is this code, as you have an unordered list within an unordered list... <ul><li><a href="?ac=auar"><strong>Annual report</strong></a></li></ul> <ul><li><a href="?ac=auec"><strong>Executive Committee</strong></a></li></ul> <ul><li><a href="?ac=aumt"><strong>Meetings</strong></a></li></ul> <ul><li><a href="?ac=aump"><strong>this</strong></a></li></ul> <ul><li><a href="?ac=aumb"><strong>Membership</strong></a></li></ul> Quote Link to comment Share on other sites More sharing options...
haku Posted January 28, 2010 Share Posted January 28, 2010 There is nothing wrong with having an unordered list within an unordered list. You can mix ordered lists and unordered lists in whatever way you want. But the problem is in the structure of how you are embedding the lists. An embedded list must be fully enclosed in <li> tags: <ul> <li>some text // notice there is no closing tag here <ol> <li>Some sub text</li> <li>Some more sub text</li> </ol> </li> // the closing tag is here <li> // again, no closing tag <ul> <li>an embedded unordered list</li> </ul> </li> // the closing tag is here </ul> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.