Button not centered align in Safari browser only.
JSFIddle
HTML
<div class="" style=" width: 100%; ">
<input value="Button" class="center-block" type="submit" style=""/>
</div>
CSS
.center-block {
display: block;
margin-right: auto;
margin-left: auto;
}
Above problem just come in Safari. In Chrome and Firefox it works fine.
if you don't set a width for btn:
text-align: center
display:inline-block
instead of display: block
.wrap {
text-align: center;
}
.center-block {
display: inline-block;
}
<div class="wrap">
<input value="Button" class="center-block" type="submit" />
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With