After trying to add clamping to my headers, my result does not turn out the way I wanted.
I made a fiddle of the code that I am using to achieve my result: https://jsfiddle.net/73kerhsn/
h3
{
margin: 0;
font-size: 13px;
}
ul
{
list-style: none;
padding: 0;
margin: 0;
}
li
{
display: inline-block;
margin: 2px;
padding: 0;
}
.acontainer
{
background-color: yellow;
width: 500px;
padding: 15px;
}
.background
{
background-color: grey;
width: 196px;
}
.block1
{
height: 110px;
width: 195px;
background-color: red;
}
.clamp
{
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
<div class="acontainer">
<ul>
<li class="background">
<div class="block1">
</div>
<h3 class="clamp">
This foo test asdas asdassd saasas dasasa asdasadsd asasddas asdadsg gfhfhg gddfd sddsfsdf
</h3>
<div>
Something
</div>
<div>
Something else
</div>
</li>
<li class="background">
<div class="block1">
</div>
<h3>
This foo test
</h3>
<div>
Something
</div>
<div>
Something else
</div>
</li>
<li class="background">
<div class="block1">
</div>
<h3>
This foo test
</h3>
<div>
Something
</div>
<div>
Something else
</div>
</li>
</ul>
</div>
I want the list items to stay at the same height, even when the header tags get bigger than the ones of the other list items (so for example, the second list item in the jsfiddle appears to be lower from the top than the first list item. I want it to still stick to the top (with the padding still in tact)).
Is there anyone out there that can help me with this? Thanks in advance.