Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 10-31-2007, 12:30 PM Not valid XHTML??
Experienced Talker

Posts: 42
Trades: 0
Why am I experiencing this error when I use the W3C validator?
(XHTML 1.0 Strict)

Line 62, Column 8: document type does not allow element "li" here; missing one of "ul", "ol" start-tag.
<li><a href="#">Policy Manual</a></li>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>").

This is the XHTML:

<div id="nav_column">
<ul>
<li><a href="home.htm">Home</a></li>
<li><a href="#">News Archive</a></li>
<li><a href="#">Bargaining Archive</a></li>
<li><a href="#">Press Releases</a></li>
<li><a href="#">Association Minutes</a></li>
<li><a href="#">Calendar</a></li>
<li><a href="#">Pension &amp; Benefits</a></li>
<br/><br/><br/>
<li><a href="#">Policy Manual</a></li>
<li><a href="#">Committees</a></li>
<li><a href="#">Labour Relations</a></li>
<li><a href="#">TC Members</a></li>
<li><a href="#">Serco Members</a></li>
<li><a href="#">Promotional Items</a></li>
<li><a href="#">Awards</a></li>
</ul>
</div><!--end nav_column-->
Ken Rogers is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-31-2007, 12:42 PM Re: Not valid XHTML??
SeventotheSeven's Avatar
Novice Talker

Posts: 12
Name: Jeff
Trades: 0
The problem is the 3 <br /> tags you are using in the middle of the ul. If you want them to be separated like that simply make a separate list or div with an extra class with a top margin.
SeventotheSeven is offline
Reply With Quote
View Public Profile
 
Old 10-31-2007, 12:46 PM Re: Not valid XHTML??
Experienced Talker

Posts: 42
Trades: 0
Bingo! Thanks so much. I got a validation. I'll separate the nav_column DIV into two separate DIVS, and create a .nav_column class for them.
Ken Rogers is offline
Reply With Quote
View Public Profile
 
Old 11-02-2007, 05:15 PM Re: Not valid XHTML??
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Or just change the code like this?

<li><a href="#">Pension &amp; Benefits</a> <br/><br/><br/></li>

Only thing that can go between an ordered or unordered list is a list item, at least if people have explained it to me right. But from inside a list item you can do more.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 11-02-2007, 07:49 PM Re: Not valid XHTML??
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
For the list item you want spacing above
<li class="topspacing">item</li>

CSS:
.topspacing {margin-top: 1em;}
joder is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Not valid XHTML??
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25934 seconds with 12 queries