<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"> <Linkrel= "stylesheet"href= "Blog%20css.css"type= "Text/css"/> <title>Second Level menu</title></Head><Body> <DivID= "NAV"> <ul> <Li><ahref="#">Home</a> </Li> <Li><ahref="#">New Essays</a> <ul> <Li><ahref="#">Secondary Menu Level Two menu</a></Li> <Li><ahref="#">Second Level menu</a></Li> <Li><ahref="#">Second Level menu</a></Li> </ul> </Li> <Li><ahref="#">Message</a> <ul> <Li><ahref="#">Secondary Menu Level Two menu</a></Li> <Li><ahref="#">Second Level menu</a></Li> <Li><ahref="#">Second Level menu</a></Li> </ul> </Li></ul></Div></Div></Body></HTML>
*{margin:0;padding:0;
}/*You can remove the default browser style*/#nav {Background-color:#eeeeee;width:600px;margin:0 Auto;/*Horizontal center of navigation bar*/Height:40px;}ul{List-style:None;}ul Li{float: Left;text-align:Center;/*Vertical center of navigation bar text*/Line-height:40px;position:relative;/*relative positioning allows the level two menu to be displayed under the corresponding one-level menu*/}a{text-decoration:None;Color:Black;Display:Block;/*With padding, let a block fill the entire Li*/padding:0 10px;}a:hover{Background-color:Black;Color:#fff;}ul Li ul Li{float:None;/*cancels the float of a level two menu so that it resumes vertical display*/Background-color:#eeeeee;Margin-top:1px;White-space:nowrap;/*Force A level two menu to be longer than the parent without wrapping, if it is in English or the number is not required*/}UL Li ul{position:Absolute;/*Position the browser as a (0,0) location and do not open a menu because the level two menu is too long*/ Left:0;Top:40px;Display:None;/*allows the initial two-level menu to be hidden*/}UL Li:hover ul{Display:Block;/*allows the mouse to go through the first menu when the level two menu is displayed*/}
HTML+CSS implementation drop-down menu