Quote:
Originally Posted by StevenLin
I want to put the colored box in the center, but I've tried several css that don't seem to work. How do I put it in the central position instead of in the current left position?
|
i think that this may be what you are looking for.
Code:
.centerbox{
width:50%;
padding:10px;
border:3px solid black;
margin-left:auto;
margin-right:auto;
margin-bottom:1em;
}
<div class="centerbox">. . . . </div>
You can adjust as needed.