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 7924939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:02:19+00:00 2026-06-03T18:02:19+00:00

I have this menu I found how to made on a tutorial but I

  • 0

I have this menu I found how to made on a tutorial but I have just one trouble. When I resize the page all the layout changes to fit into the new window size but the menu seems to make new lines when the text doesn’t fit on the screen. I want that all the menu remains in one line even if the size of the window is too small to show it all. I have tried lots of hacks I’ve found here but no one seems to work for me. This is the CSS I’m using.

#navcontainer {
margin: auto;
width: 95%;
}
#menu
{
width: 100%;
margin: 0;
padding: 0 0 0 0;
list-style: none;
background: #C2D1DA;
background: -moz-linear-gradient(#DDE7ED, #C2D1DA);
background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #C2D1DA),color-stop(1, #DDE7ED));
background: -webkit-linear-gradient(#DDE7ED, #C2D1DA);
background: -o-linear-gradient(#DDE7ED, #C2D1DA);
background: -ms-linear-gradient(#DDE7ED, #C2D1DA);
background: linear-gradient(#DDE7ED, #C2D1DA);
-moz-border-radius: 50px;
border-radius: 50px;
-moz-box-shadow: 0 2px 1px #9c9c9c;
-webkit-box-shadow: 0 2px 1px #9c9c9c;
box-shadow: 0 2px 1px #9c9c9c;
}
#menu li
{
float: left;
padding: 0 0 10px 0;
position: relative;
line-height: 0;
}
#menu a
{
float: left;
height: 13px;
padding: 0 25px;
color: #1A6B91;
text-transform: uppercase;
font: bold 12px/25px Arial, Helvetica;
text-decoration: none;
text-shadow: 0 0px 1px #004063;
}
#menu li:hover > a
{
color: #333;
}
*html #menu li a:hover /* IE6 */
{
color: #333;
}
#menu li:hover > ul
{
display: block;
}
/*SUB MENU*/
#menu ul
{
list-style: none;
margin: 0;
padding: 0;
display: none;
position: absolute;
top: 23px;
left: 0;
z-index: 99999;
background: #DDE7ED;
background: -moz-linear-gradient(#DDE7ED, #C2D1DA);
background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #C2D1DA),color-stop(1, #DDE7ED));
background: -webkit-linear-gradient(#DDE7ED, #C2D1DA);
background: -o-linear-gradient(#DDE7ED, #C2D1DA);
background: -ms-linear-gradient(#DDE7ED, #C2D1DA);
background: linear-gradient(#DDE7ED, #C2D1DA);
-moz-box-shadow: 0 0 2px rgba(255,255,255,.5);
-webkit-box-shadow: 0 0 2px rgba(255,255,255,.5);
box-shadow: 0 0 2px rgba(255,255,255,.5);
-moz-border-radius: 5px;
border-radius: 5px;
}
#menu ul ul
{
top: 0;
left: 190px;
}
#menu ul li
{
float: none;
margin: 0;
padding: 0;
display: block;
-moz-box-shadow: 0 1px 0 #0A486C, 0 2px 0 #1A6891;
-webkit-box-shadow: 0 1px 0 #0A486C, 0 2px 0 #1A6891;
box-shadow: 0 1px 0 #0A486C, 0 2px 0 #1A6891;*/
}
#menu ul li:last-child
{
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
#menu ul a
{
padding: 10px;
height: 10px;
width: 170px;
height: auto;
line-height: 1;
display: block;
white-space: nowrap;
float: none;
text-transform: none;
}
*html #menu ul a /* IE6 */
{
height: 10px;
width: 170px;
}
*:first-child+html #menu ul a /* IE7 */
{
height: 10px;
width: 170px;
}
#menu ul a:hover
{
background: #0186ba;
background: -moz-linear-gradient(#04acec,  #0186ba);
background: -webkit-gradient(linear, left top, left bottom, from(#04acec), to(#0186ba));
background: -webkit-linear-gradient(#04acec,  #0186ba);
background: -o-linear-gradient(#04acec,  #0186ba);
background: -ms-linear-gradient(#04acec,  #0186ba);
background: linear-gradient(#04acec,  #0186ba);
}
#menu ul li:first-child a
{
-moz-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
}
#menu ul li:first-child a:after
{
content: '';
position: absolute;
left: 30px;
top: -8px;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 8px solid #DDE7ED;
}
#menu ul ul li:first-child a:after
{
left: -8px;
top: 12px;
width: 0;
height: 0;
border-left: 0; 
border-bottom: 5px solid transparent;
border-top: 5px solid transparent;
border-right: 8px solid #DDE7ED;/*cambiar por gradiente*/
}
#menu ul li:first-child a:hover:after
{
border-bottom-color: #04acec;
}
#menu ul ul li:first-child a:hover:after
{
border-right-color: #04acec; /*cambiar por gradiente*/
border-bottom-color: transparent;   
}
#menu ul li:last-child a
{
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
/* Clear floated elements */
#menu:after
{
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}

And the HTML code for the menu structure is here.

<script type="text/javascript">
$(function() {
if ($.browser.msie && $.browser.version.substr(0,1)<7)
{
    $('li').has('ul').mouseover(function(){
        $(this).children('ul').show();
    }).mouseout(function(){
        $(this).children('ul').hide();
    })
}
});
</script>
<div id="navcontainer">
<ul id="menu">
<li><a href="#" onclick="inicio();">Inicio</a></li>
<li><a href="#">ISO 9001</a>
    <ul>
        <li><a href="#">Nueva A.C. o A.P.</a></li>
        <li><a href="#">Tabla A.C. y A.P.</a></li>
    </ul>
</li>
<li><a href="#" onclick="muestras();">Muestras</a>
    <ul>
        <li><a href="#" onclick="muestras();">Solicitud de Muestra</a></li>
        <li><a href="#" onclick="muestrasPendientes();">Muestras Pendientes</a></li>
        <li><a href="#">Muestras Terminadas</a></li>
        <li><a href="#">Garant&iacute;as</a></li>
        <li><a href="#">Cat&aacute;logo de Productos</a></li>
    </ul>
</li>
<li><a href="#" onclick="proyectos();">Proyectos</a>
    <ul>
        <li><a href="#" onclick="proyectos();">Nuevo Proyecto</a></li>
        <li><a href="#" onclick="proyectosVista();">Proyectos</a></li>
        <li><a href="#">Nueva Actividad</a></li>
        <li><a href="#">Actividades Proyectos</a></li>
    </ul>
</li>
<li><a href="#" onclick="tickets();">Tickets</a>
    <ul>
        <li><a href="#" onclick="tickets();">Nuevo Ticket</a></li>
        <li><a href="#" onclick="ticketsAbiertos();">Tickets Abiertos</a></li>
        <li><a href="#" onclick="ticketsTerminados();">Tickets Terminados</a></li>
        <li><a href="#" onclick="ticketsPorTerminar();">Tickets por Terminar</a></li>
    </ul>
</li>
<li><a href="#" onclick="iCalendar();">iCalendar</a></li>
<li><a href="#" onclick="mkt();">MKT</a>
    <ul>
        <li><a href="#" onclick="publicidad();">Enviar Boletin</a></li>
    </ul>
</li>
<li><a href="#">Juntas</a>
    <ul>
        <li><a href="#">Nuevo Compromiso</a></li>
        <li><a href="#">Compromisos Abiertos</a></li>
        <li><a href="#">Compromisos Terminados</a></li>
        <li><a href="#">Todos los Compromisos</a></li>
        <li><a href="#">Nueva Minuta</a></li>
        <li><a href="#">Minutas Anteriores</a></li>
        <li><a href="#">Calendario de Eventos</a></li>
        <li><a href="#">Recordar Compromisos</a></li>
    </ul>
</li>
<li><a href="https://www.estatec.com/webmail" target="_blank">Mail</a></li>
</ul>
</div>
* html #menu{
zoom: 1;
} /* IE6 */
*:first-child+html #menu{
zoom: 1;
} /* IE7 */

This is the menu as I need it
https://i.stack.imgur.com/wXLSw.png

This is the problem I got
https://i.stack.imgur.com/B01H9.png

I don’t care if the menu shows complete or not but I need it on the same line.
I hope you can help me

  • 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-03T18:02:21+00:00Added an answer on June 3, 2026 at 6:02 pm

    http://jsfiddle.net/3aSTE/

    Set a hard height to the #menu and overflow-y:hidden

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

Sidebar

Related Questions

I have found this code to make a menu that collapses when the user
I have this menu structure that is used to navigate through content slider panels.
I have a simple dropdown menu and I'd like to have this menu close/hide
i have this html menu: <ul id='main'> <li class='active current' id='lighty'> <a href='/'>Lighty</a> <ul>
I have this typoscript language menu: tmpl.NavLang = HMENU tmpl.NavLang { special=language special.value =
I have this need to place my app in the share/send context menu so
I have a SELECT LIST MENU containing products and on this menu i use
Assuming I have this HTML structure: <ul class='menu'> <li> <div></div> <div> <div></div> <div> <a
I have a selectmenu like this: $(#Menu).empty(); for (i = 0; i < data.length;
I'm confused as to how to accomplish this. I have a page which, has

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.