How to align an input tag to the center without specifying the width?
You can use the following CSS for your input field:
.center-block {
display: block;
margin-right: auto;
margin-left: auto;
}
Then,update your input field as following:
<input class="center-block" type="button" value="Some Button">
write this:
#siteInfo{text-align:center}
p, input{display:inline-block}
http://jsfiddle.net/XfSz6/
You need to put the text-align:center
on the containing div, not on the input itself.