Can't figure out why the background isn't applied to the entire button?
<a href="#" class="button">
<span>Full Story</span>
</a>
<a href="#" class="button">
Full story →
</a>
.button
{
height: 3rem;
display: inline-block;
padding: 0 2em;
border-radius: 3rem;
background-color: #80b7b3;
-webkit-box-shadow: 0px 5px 1px rgba(0, 0, 0, .5);
box-shadow: 0px 5px 1px rgba(0, 0, 0, .5);
font: 400 .95rem/3.4 arial, helvetica, sana-serif;
color: black; /* #ffffff */
text-transform: uppercase;
text-decoration: none;
letter-spacing: 2.8px;
transition: all 250ms;
}
.button:hover
{
background-color: #511e23;
color: white;
}
.button:active
{
transform: translatey(3px);
-webkit-box-shadow: none;
box-shadow: none;
}
<a href="#" class="button">
Full story
</a>
.button
{
position: relative;
height: 3rem;
display: inline-block;
padding: 0 2em;
border-radius: 3rem;
background-color: #80b7b3;
-webkit-box-shadow: 0px 5px 1px rgba(0, 0, 0, .5);
box-shadow: 0px 5px 1px rgba(0, 0, 0, .5);
font: 400 .95rem/3.4 arial, helvetica, sana-serif;
color: black; /* #ffffff */
text-transform: uppercase;
text-decoration: none;
letter-spacing: 2.8px;
transition: all 250ms;
}
.button::after {
position: absolute;
right: .5rem;
top: -.15rem;
content: '\2192'; /* &rarr */
font-weight: 900;
transform: scale(1.3);
}
.button:hover
{
background-color: #511e23;
color: white;
}
.button:active
{
transform: translatey(3px);
-webkit-box-shadow: none;
box-shadow: none;
}
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.