Thanks for stopping by! Today, I ran into a peculiar CSS issue that I need help with. Take a look at the snippet below:
/* padding: 0.5rem,2rem,0.5rem,2rem; this line is not working*/
/* while these do:*/
padding-top: 0.5rem;
padding-bottom: 0.5rem;
padding-right: 2rem;
padding-left: 2rem;
Can someone explain why this behavior is happening? By the way, I'm using this code to style buttons:
Full button styling:
.banner__button{
cursor: pointer;
outline: none;
border: none;
color: white;
font-weight: 700;
border-radius: 0.2vw;
/* padding: 0.5rem,2rem,0.5rem,2rem; */
padding-top: 0.5rem;
padding-bottom: 0.5rem;
padding-right: 2rem;
padding-left: 2rem;
margin-right: 1rem;
background-color: rgba(51, 51, 51, 0.5);
}