Wednesday, October 29, 2014

CSS - To display any content inside div to center


.parentDiv {
            text-align: center;
        }

.childDiv {
            display: inline-block;
            text-align: center;
            cursor: pointer;
           
        }


<div class="parentDiv">
   <div class="childDiv">put content</div>
   <div class="childDiv">put content</div>
   <div class="childDiv">put content</div>
</div>

No comments:

Post a Comment