width - Dropdown list UL box creates a margin on the left -
i began building website, make short: i'm making deadly simple dropdown menu isnt working out. make short, gave every element background color. know why boxes behave that, have own sizes. grey 1 wider should be. float:right doesnt seem work on both elements same. 1 further away other, should positioned right border. red border should disappear also:
#dropdown{ display:block; float:right; background:#666; width:120px; } #logo-type{ height:90px; background-image:url("https://picload.org/image/rgrwoopr/logo_font.jpg"); width:90px; background-color:green; float:right; } #dropdown ul{ margin-top:91px; background-color:red; width:120px; } #dropdown ul li{ font-size:12px; width:120px; height:40px; background-color:black; list-style:none; text-align:center; } #dropdown ul li a{ color:white; text-decoration:none; } #dropdown ul li a:hover{ text-decoration:none; } #dropdown ul li:hover{ background-color:#0c6; } <div id="dropdown"> <a id="logo-type" href="#"></a> <ul> <li><a href="">deluxetravel</a></li> <li><a href="">blog</a></li> <li><a href="">premium club</a></li> </ul> </div>
Comments
Post a Comment