Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spacing between two buttons inside a DIV

Tags:

html

I have a DIV which contain some buttons. I want 16px spacing between these buttons inside this DIV. Can someone please tell me how to do this?

like image 978
Nagaraj C K Avatar asked Aug 07 '14 08:08

Nagaraj C K


People also ask

How do I create a gap between two buttons in HTML?

The best way to add space between two HTML elements is to add either padding or a margin in CSS. padding will add space to the outside of an element and margins will add space between two elements.

How do you put a space between two buttons in material UI?

if you want to create a space between buttons you can give one button a margin-attribute. will create a 10px space between the two buttons. Save this answer.

How do you put a space between two tags?

The simplest way to add a space in HTML (besides hitting the spacebar) is with the non-breaking space entity, written as   or  . Multiple adjacent non-breaking spaces won't be collapsed by the browser, letting you “force” several visible spaces between words or other page elements.


1 Answers

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>
like image 58
Youness Avatar answered Oct 13 '22 10:10

Youness