html - How to center a button WITHOUT a div using CSS -
i trying center button without div. button follows
<body> <button>some text</button> </body>
i have tried using few different techniques such as:
text-align: center
and
margin:0 auto;
but these don't work.
its simple, make display block element:
<body> <button>some text</button> </body> button { display: block; margin: 0 auto; }
Comments
Post a Comment