I've been trying to get these divs to display side by side for a menu bar, but they keep stacking on top of each other. I've experimented with margin-right/left/top/bottom, padding, and more, but nothing seems to work. Any suggestions?
<div id="Menu" >
<div id="M_1"><a id="M_1_L" href="P4.html">Given</a></div>
<div id="M_4"><a id="M_4_L" href="P2.html">Received</a></div>
<div id="M_3"><a id="M_3_L" href="P3.html">Bucket List</a></div>
<div id="M_2"><a id="M_2_L" href="P1.html">Traditions</a></div>
</div>
Here's the CSS code:
#Menu
{
width: 50%; height: 40px; background-color: blue; margin-left: auto;
margin-right: auto; margin-top: 20px; border-radius: 20px;
}
#M_1,
#M_2,
#M_3,
#M_4 {
text-align: center; width: 20%; background-color: black;
}