HTML CSS examples for CSS Form:input button layout
Horizontally center a button element in a div element
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> div {<!-- ww w. ja v a 2 s .co m--> width: 200px; height: 100px; background: #ccc; } button{ margin: 0 auto; display: block; } </style> </head> <body> <div> <button>Button</button> </div> </body> </html>