I am facing an issue with three buttons that have the same height and width, text, and background icons on the right. On small screens or when there is only a single word in the button, I want to move the icons to the bottom center of the button. Is there a CSS solution for this? I have tried various background-position options without success.
https://i.stack.imgur.com/4D7O8.png
https://i.stack.imgur.com/JVr5z.png
html {font-family:Verdana, sans-serif; }
a {text-decoration:none; color: #fff; font-size: 28px;}
.head {display:flex;
flex-direction: row;
flex-wrap: wrap;
align-content: space-between;
justify-content: center;
padding: 5rem 0rem 0rem 0rem;
flex-grow: 1;
flex-basis: 10%;
}
.items {width: 20%;
margin:1rem;
-webkit-border-radius: 6;
-moz-border-radius: 6;
border-radius: 6px;
color: #ffffff;
padding: 10px 10px 10px 10px;
text-decoration: none;
text-align:center;
float:left;
font-size:30px;
font-weight:100;
}
.items.cli {
/* Background style */
}
.items.lab {
/* Background style */
}
.items.cat {
/* Background style */
}
.items.icon.cli span{
/* Icon positioning */
}
.items.icon.labo span{
/* Icon positioning */
}
.items.icon.cata span{
/* Icon positioning */
}
.itemscabecera a {
margin: 0px;
display: block;
width: 100%;
height: 100%;
}
<section class="head">
<div class="items cli icon cli">
<a href="#"><span>Goodtimes</span></a></div>
<div class="items lab icon labo"><a href="#"><span>Wintersnow</span></a></div>
<div class="items cat icon cata"><a href="#">
<span>Spring is here</span></a></div>
</section>