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

  • SEARCH
  • Home
  • 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 9040313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:57:24+00:00 2026-06-16T09:57:24+00:00

I have created a menu but cannot solve this issue so I am hoping

  • 0

I have created a menu but cannot solve this issue so I am hoping that someone can help me:(

Problem my last li (anchor tag) inside my menu keeps collapsing underneath my menu and no matter I do problem persists. In Firefox looks fine but in every other browser it is a disaster…

I have tried: adding overflow:hidden; to my menuwrapper,tried adding a “clear both” div after last ul tag,added display:inline-block to li tags,and a lot of other approaches to my problem but nothing works:(
I didn’t set explicit width to my anchor tags (I really don’t want to do that!).
In Firefox looks like perfect:
http://robertpeic.com/kyani/template/menu.png

in other browsers look like this: (notice that there is no blue button because it came bellow my menu)
http://robertpeic.com/kyani/template/menu2.png

I dont want this:
http://robertpeic.com/kyani/template/menu3.png

Question: How can I prevent my li’s from going below my menu even if there is no room?
Thanks for your help!!

Link to my menu

Relevant CSS looks like this:

.mainmenu{
display:block;
width:906px;
margin:0px auto;
height:42px;
background-image:url('http://robertpeic.com/kyani/template/mainmenubg.jpg');
background-repeat:repeat-x;
position:relative;
margin-top:-15px;
z-index:160;
}

.mainmenu ul{
list-style-type:none;
}

.mainmenu ul li {
float:left;
}

.mainmenu ul li a{
text-decoration:none;
display:block;
font-family:"Palatino Linotype","Book Antiqua",Palatino,FreeSerif,serif;
font-size:20px;
padding:0 23px 0 23px;
color:#383838;
border-left:1px solid #dedede;
height:42px;
line-height:42px;
z-index:100;
}

.mainmenu ul li a:hover{
color:#ffffff;
}

.mainHover{
background-image:url('http://robertpeic.com/kyani/template/hoverm.png');
display:block;
position:relative;
background-repeat:repeat-x;
z-index:-50;
}

Html looks like:

<div class="mainmenu">
<ul>
<li><a href="#">Početna</a></li>
<li><a href="#">Ky&auml;ni</a></li>
<li><a href="#">Trokut zdravlja</a></li>
<li><a href="#">Poslovna prilika</a></li>
<li><a href="#">Info predavanja</a></li>
<li><a href="#">Kontakt</a></li>
</ul>
</div><!--/mainmenu-->
  • 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-06-16T09:57:25+00:00Added an answer on June 16, 2026 at 9:57 am

    I feel so dumb right now 🙂 To prevent my li from going below I’ve only wrapped my menu with other div and set that div to overflow hidden and it worked perfect! THX everybody for your help!!!

    CSS now looks like:

    .mainmenu{
     display:block;
     width:903px;
     }
    
     .mainmenu ul{
     list-style-type:none;
     }
    
     .mainmenu ul li {
     float:left;
      }
    
     .mainmenu ul li a{
     text-decoration:none;
     display:block;
     font-family:"Palatino Linotype","Book Antiqua",Palatino,FreeSerif,serif;
     font-size:20px;
     padding:0 23px 0 23px;
     color:#383838;
     border-left:1px solid #dedede;
     height:42px;
     line-height:42px;
     z-index:100;
     }
    
     .mainmenu ul li a:hover{
     color:#ffffff;
     }
    
    .menuwrap{
    margin:0px auto;
    height:42px;
    background-image:url('http://robertpeic.com/kyani/template/mainmenubg.jpg');
    background-repeat:repeat-x;
    position:relative;
    margin-top:-15px;
    z-index:160;
    width:900px;
    overflow:hidden;
    }
    

    HTML looks like this:

          <div class="menwrap">
          <div class="mainmenu">
          <ul>
          <li><a href="#">Početna</a></li>
          <li><a href="#">Ky&auml;ni</a></li>
          <li><a href="#">Trokut zdravlja</a></li>
          <li><a href="#">Poslovna prilika</a></li>
          <li><a href="#">Info predavanja</a></li>
          <li><a href="#">Kontakt</a></li>
          </ul>
          </div><!--/mainmenu-->
          </div><!--/menuwrap-->
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried my best to solve this but i cannot figure this out.
I have created a drop down menu using JQuery but when I test it
I have created a dropdown menu with jquery: here Everything is ok but in
I have created an Activity that will behave like a popup menu is actually
I want that the menu i have created for testing entries should come in
I have created a responsive menu that breaks at 480px and below. I have
just want to ask anyone here can solve this problem? I want to create
I have created an application for which can be invoked through context menu by
Problem I have created a blank report (mychart.jrxml).I cannot figure out how to add
I have a problem which I guessed would be really simple to solve... but

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.