Jump to content

[SOLVED] Need validation help


Eiolon

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.