trying to align html button at the center of the my page [duplicate]

Here’s your solution: JsFiddle

Basically, place your button into a div with centred text:

<div class="wrapper">
    <button class="button">Button</button>

With the following styles:

.wrapper {
    text-align: center;

.button {
    position: absolute;
    top: 50%;

There are many ways to skin a cat, and this is just one.

Leave a Comment