I try to
Try
body {text-align: center;}
Since you requested DIV to be inline-block
, text-align: center;
is the answer.
<div style="text-align: center;">
<div style="display: inline-block; text-align: left;">
<input id="abc" type="button" value="button" />
</div>
</div>
display:table; would position it in center too:
CSS:
.button{
display: table;
margin: 0 auto;
}
HTML:
<div class="button">
<input id="abc" type="button" value="button" />
< /div>
Note: Using inline styles is a bad practice.