View Single Post
Old 03-13-2012, 03:21 PM   #8
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Quote:
Originally Posted by StevenLin View Post
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.

Last edited by crutledge; 03-13-2012 at 03:30 PM. Reason: Sorry about the double post.
crutledge is offline   Reply With Quote