Home > Article > Web Front-end > How to align the bottom of text in css
How to align the bottom of text in css: first create an HTML sample file; then define a div block; and finally set the css style to "display:table-cell;vertical-align:bottom;" Just align the bottom of the text.
The operating environment of this tutorial: Windows 7 system, HTML5&&CSS3 version, Dell G3 computer.
Recommended: "css video tutorial"
css method to align the bottom of the text in the div
1. Create HTML element
<div>文字在div的底部对齐</div>
2. Add css style
div{ width:200px; height:50px; /*设置div的大小*/ border:4px solid #beceeb; /*为了便于观察,显示出边框*/ display:table-cell; vertical-align:bottom; }
Rendering:
For more programming-related knowledge, please visit:programmingvideo! !
The above is the detailed content of How to align the bottom of text in css. For more information, please follow other related articles on the PHP Chinese website!