SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Addict jamus's Avatar
    Join Date
    Jul 2004
    Location
    Devon, UK
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE drop down navigation overlapping issue

    Hi,

    I have a css drop down menu list that is fine in safari and firefox but has an overlapping issue in IE6. The 'menuparent' element that activates some javscript on rollover seems to sit under the list item above it??

    It can be viewed below.

    http://www.biz-r.co.uk/vs/

    HTML Code:
    <ol  id="primary-nav">
    	<li  class="selected">one</li>
          <li><a href="#">two</a></li>
          <li><a href="#">three</a></li>
          <li><a href="#">four</a></li>
          <li><a href="#">five</a></li>
            <ul id="primary-nav">
      			<li class="menuparent"><a  href="#" >about</a></li>
    		</ul>
    </ol>
    Any ideas?

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your HTML is invalid - your <ul> is improperly nested.

  3. #3
    SitePoint Addict jamus's Avatar
    Join Date
    Jul 2004
    Location
    Devon, UK
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Tyssen,

    I believe the code was from alistapart.com

    Can see how to correct it while keeping the same classes around the same elements?

  4. #4
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <ol  id="primary-nav">
    	<li  class="selected">one</li>
          <li><a href="#">two</a></li>
          <li><a href="#">three</a></li>
          <li><a href="#">four</a></li>
          <li><a href="#">five</a>
            <ul id="primary-nav">
      			<li class="menuparent"><a  href="#" >about</a></li>
    		</ul>
          </li>
    </ol>
    The second list (ul) should be inside the li

  5. #5
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not only that, but you shouldn't use the same ID value more than once. In this case, you can safely ditch the ID on the unordered list and reference the UL directly.

    Code:
    #primary-nav ul {
        /* style rules for unordered list */
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •