Jump to content

Problems with Lists in IE


millercj

Recommended Posts

I've created a strict doctype page and therefore must make nested lists as follows:

 

<ul>
   <li></li>
   <li></li>
   <li></li>
       <ul>
           <li></li>
       </ul>
   </li>
</ul>

 

So i've implemented the example into my code and i thought all was well until i tested it in IE (surprise surprise).

 

When i look at it the third li which the second ul is nested in it shows on it's own line in IE but not firefox.

 

you can view it at http://stjohns.digiconmediagroup.com/aboutus/joel.php

 

I'm not sure how to get rid of it

 

 

 

Link to comment
Share on other sites

are you trying to indent a list within another list? if so then you need to simply use the <ul>...</ul>

after an item is closed tagged.

so

<ul>

<li>...</li>

<li>...</li>  ( you did not close this one)

  <ul>

<li>...</li>

<li>...</li>

  </ul>...

</ul>

 

Um ... no, he was right. The proper html 4 way to embed lists is to embed them within the parent level list item.

<ul>
<li>blah blah blah</li>
<li>blah blah blah   ( you SHOULD not close this one)
     <ul>
     <li>blah blah blah</li>
     <li>blah blah blah</li>
    </ul>
</li>
<li>blah blah blah</li>
</ul>

 

That said, the problem with the page is not the lists.

You are tripping every IE bug in the book ... HasLayout, the guillotine effect,

uncleared floats, DoubleMargin bug, box-model bug.

 

LOL. Don't you just LOVE IE?

 

You also have a serious case of "Divitus", and so much code in your markup and css, I can't begin to try to debug it.

 

You need to make life simpler. replace DIV containers wherever you can simple declare the class or id in a block level tag like: p,h1, h2, ul, ol, etc. ... change this:

 

<div id="trail">
<ul>
<li><a href="/"><strong>Home</strong></a></li>
<li><a href="/aboutus">About Us</a></li>
<li class="last">Rev. Joel Risser</li>
</ul>
</div><!--trail-->

to this:

<ul  id="trail">
<li><a href="/"><strong>Home</strong></a></li>
<li><a href="/aboutus">About Us</a></li>
<li class="last">Rev. Joel Risser</li>
</ul>

 

That just eliminated two whole lines of code.

 

Also, a "div" is just a markup html placeholder and NOT a logical tag. You can't just slap text into them without proper semantic logical tag containers: like: p, h1, h2, ul, ol, etc.

 

Spans are NOT html placeholders, the are used to embed a style within a span of text within a markup block tag like p, h1, li, etc.

 

The page is lousy with empty "divs" and paragraphs ... an accessibility/SEO nightmare, un-contained spans, uncleared floats.

 

All in all, the page would be better off if you had used old used table based layout, and transitional doctypes.

 

Because it has almost as much tag soup and page weight. It is a beautiful layout. But it uses div tags as if they were table cells.

 

 

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.