The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › how to display menu bar horizontally(both parent and child menus )
plz give solution
The Sub menus should only be seen bei mouseover right ?
html
Home subpoint1 subpoint2 Menupoint2 subpoint1 subpoint2
Use
css
ul, li { padding:0; margin: 0; } ul#mainmenu li {float:left; position:relative; margin: 4px;} ul#mainmenu ul {display:none; position:absolute; margin:5px 0; width:400px;} ul#mainmenu li:hover > ul {display: block; }
thats very basic, the width and margins i used there are only placeholders, play with it. If you don’t want floats you can set the li elements to display:inline. Should also work as well.