Home » Categories » CSS Tricks

CSS vertical-align: text-bottom;

HTML:

<div class="parent">
<div class="child">
This text is vertically aligned to bottom.
</div>
</div>

 

CSS:

.parent {
width: 300px;
height: 50px;
display: table;
border: 1px solid red;
}
.child {
display: table-cell;
vertical-align: bottom;
}

 

Source:

https://stackoverflow.com/questions/13586171/css-vertical-align-text-bottom

Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Comments Comments
There are no comments for this article. Be the first to post a comment.
Related Articles RSS Feed
CSS transition Property
Viewed 552 times since Wed, Sep 2, 2020
CSS show/hide next elements
Viewed 521 times since Sun, Oct 4, 2020
The :empty pseudo selector will select elements that contain either nothing or only an HTML comment.
Viewed 523 times since Sun, Oct 4, 2020