I am doing a event list and i would like make it in the middle. However, it's failed many times, i have tried to put vertical-align: middle
almost everywhere and still not working.
I tried also to put in the html itself instead of my css file and i do not want to use something like padding or margin cause it will affected a lot of elements
<div id="programlist" class="bounce-in">
<div12>
<li1 style="width: 15%;"><img src="images/icon/idea.png" width="100px"></li1>
<li1 style="width: 50%;"><h3>ABC EVENT</h3><p>You can xxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxx.</p></li1>
<li1 style="width: 5%;"><img src="images/time.png" width="50px" height="50px"></li1>
<li1 style="width: 10%; vertical-align: middle"><p><strong>12/2/2019</strong></p></li1>
<li1 style="width: 20%;"><a onclick="window.open('idea/index.html','popUpWindow','height=800,width=1160,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no, status=no');"><buttonclass="button"><span>REGISTER</span></button></a></li1>
</div12>
</div>
<style>
#programlist div12 {
display:flex;
list-style:none;
height: 130px;
border-bottom: 1px solid #999;
}
#programlist div12:hover {
background: #eee;
}
#programlist h9 {
font-size: 20px;
text-transform: uppercase;
}
#programlist li1 img {
margin: 0 0 0 0;
}
#programlist li1 {
padding: 5px;
width: 100%;
}
#programlist button {
border-radius: 4px;
background-color: #00645a;
border: none;
color: #FFFFFF;
text-align: center;
font-size: 20px;
padding: 5px;
width: 200px;
transition: all 0.5s;
cursor: pointer;
margin: 0px;
}
#programlist button span {
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
}
#programlist button span:after {
content: '\00bb';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
transition: 0.5s;
}
#programlist button:hover span {
padding-right: 15px;
}
#programlist button:hover span:after {
opacity: 1;
right: 0;
}
</style>
How can I make my list vertically aligned centred?
https://codepen.io/crocsx-the-styleful/pen/jdByeq
use
display: flex;
align-items: center;
on your li