Reputation:
I've tried padding a button in CSS but the outside padding on the left won't work.
.button-container {
padding-left 20vh;
padding-bottom: 1vh;
display: inline-block;
}
.button {
background-color: ##09b39f;
border: none;
padding: 2vh;
text-decoration: none;
display: inline-block;
border-radius: 2vh;
}
<div class="button-container">
<button class="button"><p>Here's a button</p></button>
</div>
I've tried using a container for the button and then adding padding around that. The padding won't work on the left side. Any ideas because I can't see it.
Upvotes: 0
Views: 5201
Reputation: 171
I believe you're missing a colon after the css selector.
.button-container {
padding-left: 20vh;
padding-bottom: 1vh;
display: inline-block;
}
.button {
background-color: ##09b39f;
border: none;
padding: 2vh;
text-decoration: none;
display: inline-block;
border-radius: 2vh;
}
<div class="button-container">
<button class="button"><p>Here's a button</p></button>
</div>
Upvotes: 1