Struggling to align two divs side by side and encountering issues. Despite researching similar problems on stack overflow, I can't seem to find a solution that works for me.
Can someone spot any errors in my code? The second div is not aligned properly with a gap between the two. Any help would be appreciated.
(I've tried with and without using vertical-align: top)
#parent {
width: 96%;
}
#Div1 {
float: left;
width: 46%;
left: 1%;
border: 1px solid rgba(0, 0, 0, 1);
vertical-align: top
}
#Div2 {
float: left;
width: 46%;
left: 49%;
border: 1px solid rgba(0, 0, 0, 1);
vertical-align: top
}
<div id="parent">
<div id="Div1">some text</div>
<div id="Div2">some more text</div>
<br style="clear: both;" />
</div>