I have theese 3 divs with some content in them and i have to put links (marked with red) on one line regardless of how long the text will be. They always have to stay on one same line.
flexbox usage is mandatory
flex-end property doesn’t seem to help
here’s how it should look like
.tl {
m-w: 1200px;
display: flex;
color: #000;
margin-top: 70px;
justify-content: space-evenly;
padding-left: 18px;
/* padding-top: 30px; */
}
.tile {
text-align: left;
padding-left: 40px;
margin-top: 0px;
padding-top: 0px;
width: 100%;
padding-bottom: 20px;
display: flex;
flex-direction: column;
}
.plus {
align-self: flex-end;
}
<div class="tiles">
<div class="container tl">
<div class="tile chart">
<h3>SEO Optimized</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galand scrambled it to make</p>
<a href="#" class="plus">+</a>
</div>
<div class="tile pad">
<h3>SEO Optimized</h3>
<p>Lorem Ipsum is simply dummy text of the printing adustry's standard dummy text ever since the 1500s, xt ext ever since the 1500s,ver since the 1500s,when an unknown printer took a galley of type and scrambled it to makemy text ever since the 1500</p>
</div>
<div class="tile cloud">
<h3>SEO Optimized</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make</p>
<a href="#" class="plus"></a>
</div>
</div>
2
Answers
You can’t align elements that do not share a parent but what you can do is push each “plus” to the bottom of each tile.
Just apply
margin-top: auto;
to the “plus” elements.Since all the tiles are the same height, the “plus” items will line up.
Adding
flex: 1
to thep
tag for description should do the trick. This makes the description take all the available space inside the container pushing the plus symbol all the way to the bottm.