Reputation: 113
I'm trying to make button fixed using margin-bottom
but it's not working if there is longer title.
My example: photo
<div class="post-detail-container-div">
<br />
<div class="post-content-div">
<h3 class="post-title entry-title">
<a href="vijest?id=<?php echo $p['link'];?>"><?php echo $p['naslov']; ?></a>
</h3>
<div class="spusti">
<ul class="list-unstyled list-inline post-metadata">
<li>
<i class="far fa-calendar"></i> Mon, 06-09-2018 |
</li>
<li>
<i class="far fa-comment"></i>
<a href="#">Comments(10)</a>
</li>
</ul>
<p class="post-excerpt"> <?php echo $p['uvodni_tekst'];?> </p>
<hr>
<div class="view_detail">
<a href="vijest?id=<?php echo $p['link'];?>" class="blog-btn">Pročitaj više</a>
</div>
</div>
If you check photo you can see that button's are not in same line because title is longer.
My CSS class view_detail:
.view_detail {
text-align: center;
margin-bottom: 30px;
}
I'm using bootstrap too, so every suggestion is welcome.
Upvotes: 0
Views: 183
Reputation: 1619
The simplest way:
position: relative;
to the main card containerposition: absolute; bottom: 0;
to the button containermargin-bottom
of the text part as the height of the button containerUpvotes: 1