html - align inner div to center -


i have 2 div, inner div & outer div. how align inner div center?
here source code:

<div class="menu">     <a href="adminhomepage.php?id=logout">manage staff</a> </div> 

here css:

.menu{     margin: 100px auto;     z-index: 2;     opacity: 0.9;     text-shadow: 2px 2px 5px #000000;     width:300px;     border-style: solid;     border-width: 1px; }  .menu a{     color: #fff;     font-size: 35px;     border-style: solid;     border-width: 1px; } 

enter image description here
the outer div on center, inner 1 align left. how align center?

add text-align: center; parent divs css

.menu{      margin: 100px auto;      z-index: 2;      opacity: 0.9;      text-shadow: 2px 2px 5px #000000;      width:300px;      border-style: solid;      border-width: 1px;      text-align: center;  }    .menu a{      color: #fff;      font-size: 35px;      border-style: solid;      border-width: 1px;  }
<div class="menu">      <a href="adminhomepage.php?id=logout">manage staff</a>  </div>


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -