center div tags inside parent div
- by Senthilnathan
I have two div tags inside a parent div. I want to display the two divs in same line and centered. Below is the html code.
<div id="parent">
<div id="addEditBtn" style="display:inline-block; vertical-align: middle; width:20px; cursor:pointer;" class="ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-pencil"></span></div>
<div id="deleteBtn" style="display:inline-block; vertical-align: middle; width:20px; cursor:pointer;" class="ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-trash"></span></div>
</div>
I tried with "display:inline-block; vertical-align: middle;" but its getting aligned left. Please help me out to centered the div tags inside the parent div.