Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6709749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:55:08+00:00 2026-05-26T07:55:08+00:00

I have got a problem in displaying the nested list in IE, firefox displays

  • 0

I have got a problem in displaying the nested list in IE, firefox displays it perfect.

I’m attaching the screenshots and code also.

HTML Code:

<div class="header-boxes" id="topic-options">
<a id="slidertoggle" href="#">List Title</a>
<div id="options" style="display: none;">
<ul>
<li ><a href="#">Topic1</a></li>
<li ><a href="#">Topic2</a></li>
<li ><a href="#">List1 » </a>
<ul >
<li><a href="#">Topic3</a></li>
<li><a href="#">Topic4</a></li>
<li><a href="#">Topic5</a></li>
</ul>
</li>
<li ><a href="#">Topic6</a></li>
</ul>
</div>
</div>

CSS Code :

    #topic-options {
    width: auto;
    z-index: 3000;
}

.header-boxes {
    float: left;
    font-family: "Trebuchet MS",Arial,sans-serif;
    font-size: 13px;
    height: 27px;
    margin-right: 8px;
}

a#slidertoggle {
    background: url('2downarrow.png') no-repeat scroll 95% 50% #D9E4FF;
    border-radius: 5px 5px 5px 5px;
    color: #3F3019;
    display: block;
    padding: 7px;
    width: auto;
    margin: 0;
}

a:link, body_alink {
    color: #B35400;
}

a {
    color: #B35400;
    text-decoration: none;
}

#options {
    border: 1px solid #EBE1D6;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    display: none;
    position: absolute;
    width: auto;
    z-index: 50;
}

ol, ul {
    list-style: none outside none;
    padding : 0; 
    margin : 0;
}

#options ul li {
    border-bottom: 1px solid #EBE1D6;
    background-color: #DFEFFC;
    position: relative;
}

#options ul li a {
    background-color: #DFEFFC;
    display: block;
    padding: 7px 10px;
}


#options ul ul {
    border: 1px solid #EBE1D6;
    border-bottom-right-radius: 5px;
    border-top-right-radius: 5px;
    left: 100%;
    position: absolute;
    top: -1px;
    visibility: hidden;
}

ScreenShots :

In firefox the code works well and fine displaying the nested list as expected.

Firefox :

Firefox http://geniusguru.in/test/moz.jpg

In IE (tested in IE7) the code displays as the below image the nested ul inside li has a gap between it and its parent. Tried all the bloddy stuff but no luck.

IE7 :

IE7 http://geniusguru.in/test/ie.JPG

Please help me out.

Sorry for not posting my jquery code

JQUERY Code :

     function getSubnav(ele) {
      if (ele.nodeName.toLowerCase() == 'li') {
        var subnav = $('> ul', ele);
        return subnav.length ? subnav[0] : null;
      } else {
        return ele;
      }
    }


$(document).ready(function(){

$('#slidertoggle').click(function(e){
e.preventDefault();
$('#options').show();
});

$('#options').mouseleave(function(e){
$('#options').hide();
});

var maxWidth = $('#topic-options').width()>$('#options').width()?$('#topic-options').width()+24:$('#options').width()+24;

$('#topic-options').css({'width': maxWidth+'px'});
$('#options').css({'width': maxWidth+'px'});

$('#options > ul > li > ul').each(function(){
$(this).css({'width' : maxWidth+'px'});
});

$('#options > ul > li').hover(function(){

var sub = getSubnav(this);

if(!sub) return;
$(sub).css({'visibility' : 'visible'});
},
function(){

var sub = getSubnav(this);

if(!sub) return;
$(sub).css({'visibility' : 'hidden'});
});

});

Thanks,
Sandeep

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:55:09+00:00Added an answer on May 26, 2026 at 7:55 am

    http://jsfiddle.net/TEqmH/1/

    Works fine on my end, both in IE7, firefox etc. :/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got a problem with calling a global function, which takes a pointer
I have got the following problem since the server has safe mode turned on,
I have got a strange problem about in_array recently which I cannot understand. e.g.
I have got a performance problem about TextField.htmlText +=msg .And I know that TextField.appendText(msg)
I've got a problem where I have a .co.uk domain of which I am
Got a problem with a query I'm trying to write. I have a table
I've got a problem I can't find any solution for. I have a textfile
I've got a problem I'm not sure how best to solve. I have an
Okay, so I've got a problem - and I'd love to have it fixed.
I have the following problem: I got a view with two text fields and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.