My Html is as follow,
<html>
<head>
</head>
<body>
<label>Name : </label>
<input type="text" id="user" />
<button id="submit"> Hit Me !!</button>
</body>
<p id="id1"> This is paragraph which has id1.</p>
<p id="id2"> This is paragraph which has id2.</p>
<button id="change"> To Change Color !!</button>
</html>
This is just a small portion of my code and I have lots of button tags in my HTML. I want to put all the buttons in the center of screen (Horizontally). I have also created same CSS for all buttons. So what to write in that CSS, so I can get all the buttons in center ?
button{
margin-left:auto;
margin-right:auto;
}
in your CSS file for all buttons