I have two buttons in my code and wondering how can I move them to the center of the screen using CSS.I tried playing around with the padding: 10px 24px 24px 30px;
but it doesn't seem to be putting the two buttons at the center of the screen. Also, I want them to be responsive.
Here is my snippet:
/* .btn-group button { */
.btn-group-vertical button {
background-color: #0b0e0d; /* Black background */
border: 1px solid rgb(239, 240, 239); /* border */
color: white; /* White text */
padding: 10px 24px 24px 30px; /* Some padding top right bottom left */
cursor: pointer; /* Pointer/hand icon */
width: 50%; /* Set a width if needed */
display: block; /* Make the buttons appear below each other */
font-weight: bold;
font-size: 14px;
text-transform: uppercase;
margin-bottom: 50px;
}
.btn-group button:not(:last-child) {
border-bottom: none; /* Prevent double borders */
}
/* Add a background color on hover */
/* .btn-group button:hover { */
.btn-group-vertical button:hover {
background-color: #ffffff;
color: #0b6d11;
}
<div >
<div >
<div class="btn-group-vertical">
<button type="button" id = "stbButton " '">First Button</button>
<button type="button" id = "cdbButton" >Second Button</button>
</div>
</div>
</div>