Eiolon Posted March 21, 2009 Share Posted March 21, 2009 I'm not a designer so I am having trouble understanding the errors. I'm looking for someone to translate for me. I'm trying to validate with XHTML 1.0 Strict. Thanks! Line 15, Column 18: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag. <ul class="menu"> The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>"). and Line 22, Column 18: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag. <ul class="menu"> The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>"). Here is my menu file where the code in question is located: <div id="menu"> <div style="float:left"> <span class="menu"> <ul class="menu"> <li><a href="../index.php" title="Home">Home</a></li> </ul> </span> </div> <div style="float:right"> <span class="menu"> <ul class="menu"> <?php if (isset($_SESSION['id'])) { echo '<li><a href="../logout.php" title="Logout">Logout</a></li>'; } else { echo '<li><a href="../login.php" title="Login">Login</a></li>'; } ?> </ul> </span> </div> <div style="clear:both"></div> </div> Link to comment https://forums.phpfreaks.com/topic/150487-solved-need-validation-help/ Share on other sites More sharing options...
haku Posted March 22, 2009 Share Posted March 22, 2009 I'm thinking that you can't wrap the <ul> in the span tags. I could be wrong, but try removing the span that is containing the <ul>. You shouldn't need it anyways - if you need to change anything, you can target the <ul> tag directly. Link to comment https://forums.phpfreaks.com/topic/150487-solved-need-validation-help/#findComment-790735 Share on other sites More sharing options...
jlhaslip Posted March 23, 2009 Share Posted March 23, 2009 to assist in the expanation from haku, above: UL 's are block level elements and Spans are inline. You can have inline elements inside block-level ones, but the opposite doesn't work. Link to comment https://forums.phpfreaks.com/topic/150487-solved-need-validation-help/#findComment-791539 Share on other sites More sharing options...
Eiolon Posted March 24, 2009 Author Share Posted March 24, 2009 Thanks very much, that solved it. Link to comment https://forums.phpfreaks.com/topic/150487-solved-need-validation-help/#findComment-792941 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.