0

How to display list element in Continuous Horizontal(inline) form. Please make a code if u know it . Which can overflow.

Display list element in Continuous Horizontal (inline) form with margin between each element & right border.

9th Sep 2019, 5:13 PM
Sourabh Mane
Sourabh Mane - avatar
4 ответов
+ 17
<style> *{margin:0; padding:0;} a{text-decoration:none;} #menu { width:100%; height:50px; float:left; } #main-menu {list-style:none;} #main-menu li{ background:#ccc; list-style:none; float:left; border:1px solid transparent; transition:.3s; position:relative; } #main-menu li a{ padding:10px 30px; float:left; } #main-menu > li:hover{ border:1px solid blue; } #main-menu > li:hover ul{ visibility:visible; opacity:1; } #main-menu li ul{ position:absolute; float:left; left:-1px; top:39px; border:1px solid blue; border-top:none; width:100%; visibility:hidden; opacity:0; transition:all .3s; } #main-menu li ul li{float:none;} #main-menu li ul li:hover {background:#ccc;} #main-menu li ul li a{ float:none; display:block; text-align:center; } </style> <body> <div> <nav> <ul id="main-menu" > <li><a href="#" >one</a></li> <li><a href="#" >two</a></li> <li><a href="#" >three</a> <ul> <li><a href="#" >apple</a></li> <li><a href="#" >orange</a></li> <li><a href="#" >melon</a></li> </ul> </li> </ul> </nav> </div>
9th Sep 2019, 7:40 PM
Sheida Hedayati
Sheida Hedayati - avatar
+ 12
Sourabh I edited my answer 👆 I think you want something like number three (when you hover it)
10th Sep 2019, 10:03 AM
Sheida Hedayati
Sheida Hedayati - avatar
+ 2
Thanks alot Sheida hedayati, but I am look for something else. Please visit NDTV Web u will see menu list which can overflow . Home | latest |......... If u get an idea please share with me how to code this. Waiting for ur reply
10th Sep 2019, 6:18 AM
Sourabh Mane
Sourabh Mane - avatar
0
Its nice codeing
12th Sep 2019, 1:10 PM
Nomam khan
Nomam khan - avatar