I have a element that I am trying to center using
margin = 0 auto;
Yet, the margin will not show up when I inspect the page in the browser. Any suggestions of how I could fix this problem?
#main{
margin: 0 auto;
width: 100%;
}
<div id="main">
<div id="heading">
<img class="head" id="mainImg" src="Images/logo.png" alt="Know Music">
<button class="head head2 font" href="" id="hb1">Guitar</button>
<button class="head head2 font" href="" id="hb2">Bass</button>
<button class="head head2 font" href="" id="hb3">Piano</button>
<button class="head head2 font" href="" id="hb4">Drums</button>
<i class="fa fa-bars menu"></i>
</div>
<div id="div-mi1">
<img id="mi1" alt="Eletric Guitar" src="Images/guitarplaying.jpg">
<h2 id="mt1" class="font">Test</h2>
</div>
</div>