Center form submit buttons HTML / CSS

I'm having troubles centering my HTML form submit buttons in CSS.

Right now I'm using:

    <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">

with this CSS content

    width: 100px;
    margin-left: auto;
    margin-right: auto;

#btn_i {
    width: 125px;
    margin-left: auto;
    margin-right: auto;

And it's not doing anything. I know I'm probably doing something stupid wrong. How can I fix this?

задан Peter Mortensen 14 July 2019 в 21:20