Apologies for the repetitive question, but I am in need of some answers.
In my opinion: Having 1 div with a width of 100% and 2 divs inside each with a width of 50%. Why does it not fit properly?
HTML:
<div id="top-menu">
<div id="logo"></div>
<div id="menu-top"></div>
</div>
CSS:
#top-menu{
width: 100%;
height: 100px;
position: relative;
border: 1px solid black;
background-color: #A3238E;
}
#logo{
width: 50%;
height: 100px;
position: relative;
display: inline-block;
background: orange;
}
#menu-top{
width: 50%;
height: 100px;
position: relative;
display: inline-block;
background: green;
left: 0;
}
I notice a small blank space between the two divs, and I am unsure how to remove it... Also, setting the second one to Width: 49% seems to work... But it doesn't with 50%, presumably due to that little space between them.
Any solutions on making it function as intended?