Center form submit buttons HTML / CSS
http://jsfiddle.net/SebastianPataneMasuelli/rJxQC/
i just wrapped a div around them and made it align center. then you don't need any css on the buttons to center them.
<div class="buttonHolder">
<input value="Search" title="Search" type="submit" id="btn_s">
<input value="I'm Feeling Lucky" title="I'm Feeling Lucky" name="lucky" type="submit" id="btn_i">
</div>
.buttonHolder{ text-align: center; }
Input elements are inline by default. Add display:block
to get the margins to apply. This will, however, break the buttons onto two separate lines. Use a wrapping <div>
with text-align: center
as suggested by others to get them on the same line.