Spacing between two buttons inside a DIV

You can use margin-right as follows:

<div class='myDiv'>
    <button style='margin-right:16px'>Button 1</button>
    <button style='margin-right:16px'>Button 2</button>
    <button>Button 3</button>
</div>

this could be your scenario:

<div>

    <input style="margin-right: 16px" type="submit">

    <input style="margin-right: 16px" type="submit">

    <input style="margin-right: 16px" type="submit">

</div>

each submit button has a margin right of 16px for the next one.


in the css :

.Container input{ /* You Can Name it what you want*/
margin-right:16px;
}
.Container input:last-child{
margin-right:0px;
/*so the last one dont push the div thas giving the space only between the inputs*/
}

give that css class to the div :

<div class="Container "><input........</div>

Tags:

Html