css - Top Align ULs When Parent Text Wraps -
i have nav when parent text wraps, drops ul down not top align adjacent uls.
in fiddle below, find park top aligned adjacent golf preserve , recreation center lis , not top aligned adjacent lis.
https://jsfiddle.net/vge8vuxd/
<div class="row topnavmain"> <ul class="nav mobile-nav"> <li class="active level0"> <a class="has-sub-menu active" href="http://www.someurl.com/playrecreation"><span>play & recreation</span><span class="border"></span></a><i class="fa fa-chevron-down"></i> <ul class="sub-menu"> <li class="level1"> <a class="has-sub-menu " href="http://www.someurl.com/playrecreation/golfhere"><span>golf here</span><span class="border"></span></a><i class="fa fa-chevron-down"></i> <ul class="sub-menu"> <li class="level2"><a class="" href="http://www.someurl.com/playrecreation/golfhere/golfpreserve"><span> golf preserve</span><span class="border"></span></a></li> <li class="level2"><a class="" href="http://www.someurl.com/playrecreation/golfhere/golfcourse"><span> golf course</span><span class="border"></span></a></li> <li class="level2"><a class="" href="http://www.someurl.com/playrecreation/golfhere/bookteetimes"><span>book tee times</span><span class="border"></span></a></li> </ul> </li> <li class="level1"> <a class="has-sub-menu " href="http://www.someurl.com/playrecreation/popcorn,trailsopenspace"><span>popcorn, trails & open space</span><span class="border"></span></a><i class="fa fa-chevron-down"></i> <ul class="sub-menu"> <li class="level2"><a class="" href="http://www.someurl.com/playrecreation/play,trailsopenspace/findapark"><span>find park</span><span class="border"></span></a></li> <li class="level2"><a class="" href="http://www.someurl.com/playrecreation/play,trailsopenspace/openspacetrails"><span>open space & trails</span><span class="border"></span></a></li> <li class="level2"><a class="" href="http://www.someurl.com/playrecreation/play,trailsopenspace/forestry"><span>forestry</span><span class="border"></span></a></li> </ul> </li> <li class="level1"> <a class="has-sub-menu " href="http://www.someurl.com/playrecreation/recreationcenters"><span>recreation centers</span><span class="border"></span></a><i class="fa fa-chevron-down"></i> <ul class="sub-menu"> <li class="level2"><a class="" href="http://www.someurl.com/playrecreation/recreationcenters/recreationcenter"><span> recreation center</span><span class="border"></span></a></li> <li class="level2"><a class="" href="http://www.someurl.com/playrecreation/recreationcenters/fitnesscenter"><span> fitness center</span><span class="border"></span></a></li> <li class="level2"><a class="" href="http://www.someurl.com/playrecreation/recreationcenters/anotherfitnesscenter"><span> fitness center</span><span class="border"></span></a></li> </ul> </li> </ul> </li> </ul> </div> .topnavmain ul, .topnavmain ul li { display: block; margin: 0px; padding: 0px; list-style-type: none; position: unset; } .topnavmain ul.nav li { display: block; background: none; } .topnavmain ul.nav li span { display: block; } .topnavmain ul.nav > li > { position: static; padding: 17px 20px; color: #555759; font-size: 16px; line-height: 100%; letter-spacing: 1px; } .topnavmain ul.nav { display: table; width: 95%; float: right; } .topnavmain ul.nav > li { display: table-cell; } .topnavmain ul.nav > li > { text-align: center; position: relative; } .topnavmain ul.nav li .sub-menu { display: table; position: relative; width: auto !important; text-align: left; } .topnavmain ul.nav li .sub-menu li { display: table-cell; padding: 20px 10px 35px; vertical-align: top; } .topnavmain ul.nav li .sub-menu { display: inline-block; margin: 10px 0 20px; padding: 5px 0px; color: #555759; font-size: 16px; line-height: 100%; font-weight: bold; } .topnavmain ul.nav li .sub-menu ul li { width: 100% !important; display: block; float: left; text-align: left; padding: 0; margin: 10px 0 0; } .topnavmain ul.nav li .sub-menu ul { padding: 5px 0; font-size: 13px; color: #797b7c; font-weight: normal; } .topnavmain ul.nav li .sub-menu li ul li { margin: 0; } .topnavmain ul.nav li .sub-menu ul li ul { display: none; }
thanks assistance.
you need put fixed height on
.topnavmain ul.nav li .sub-menu { .... height:20px; }
Comments
Post a Comment