Bridging the gap between HTML elements
I'm trying to get this dropdown to work, but there is a space between the title and the menu bar.
http://codepen.io/xdtrammell/pen/zneDa
Here is my css for two containers:
.menu-bar {
width:100%;
background-color: #f50057;
border-top-left-radius:10px;
border-top-right-radius:10px;
}
.menu-drop {
background-color:#212121;
border-style: solid;
border-color:#f50057;
border-top:0px;
border-width: 2px;
border-bottom-left-radius:5px;
border-bottom-right-radius:5px;
width:99.6%;
height:80px;
}
EDIT: We've fixed the items whitespace, but when using the switch, the gap still appears.
+3
source to share
3 answers
your .navicon is just a problem;) here's the Codepen fix and demo
.navicon {
/*float: right;*/
height: 6px;
width: 34px;
margin-right:50px;
border-top: 15px double #212121;
border-bottom: 5px solid #212121;
font-size: 0;
/*position:relative;*/
position:absolute; /* added */
/*bottom:55px;*/
right:6px; /* added */
top:38px; /* added */
cursor:pointer;
transition: all .3s ease-in-out;
}
+2
source to share