Problema al mostrar la barra de desplazamiento con el menú desplegable

I am trying to make a menu with many items, sub items. I want to display scroll bar along with the items if they are increased. I want to do same with sub menus and so on.

Aquí está la ejemplo about what i am doing.

The problem is, It is displaying horizontal scroll bar, if sub menu again have some items as child. I want to show only vertical scroll bar. and want to pop out sub menues.

Link of css i am using.

preguntado el 09 de enero de 11 a las 07:01

I'm pretty sure this kind of behavior is outside the scope of CSS. -

1 Respuestas

You can specify separate horizontal and vertical overflow behaviors:

overflow-x: hidden;
overflow-y: scroll;

Your CSS reference material should have told you that. This will of course make a complete mess of any submenus that try to pop out along the x-axis.

Scrollbars in a menu will also make your users hate you and possibly win you a place in the User Interface Hall of Shame or a post on If you're thinking about doing something like this in the real world, don't do it. Think of a less irritating way to organize your navigation.

Respondido el 09 de enero de 11 a las 13:01

+vote for your suggestion about not to display scroll bar. But hiding overflow for a particular direction can hide the scrollbar. But it can not pop out the submenu. :( - Amit Kumar Gupta

And that should be a hint that you're doing things you shouldn't. If you want to mix menus and scrollbars like that you're going to end up having to position everything by hand with position:absolute. - mu es demasiado corto

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.