Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WDG Validator question

Status
Not open for further replies.

ghijkl

Programmer
Joined
Mar 23, 2003
Messages
17
Location
AU
I get this suggestion from WDG Validator -
"Error: element LI not allowed here; possible cause is an inline element containing a block-level element" for this url Can anybody tell me what the problem is?
 
I tried it in the W3C validator ( ) which, once I'd picked a doctype and encoding, found the problem right away.

You need to enclose your <li> tags within either an <ol> for an ordered (numbered) list, or a <ul> for an unordered (bullet point) list (could also use <dir> or <menu> tags, but I don't know much about them).

You can nest one <ol>/<ul> within another, which should give you the staggered effect you seen to be after, like this:

Code:
<ul>
   <li>Main Point</li>
   <li>And Another
      <ul>
         <li>little point</li>
         <li>ditto</li>
      </ul>
    </li>
   <li>Yet Another Main Point!</li>
</ul>

You can then (if you want) use CSS to define the indent and bullet to use for nested lists. -- Chris Hunt
Extra Connections Ltd
 
bloody wonderful advice - thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top