how can i change the text position ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

how can i change the text position ?

I made a div where i gave the different background image for that div so i want the text at the bottom of that div how can i do that

7th Jun 2017, 9:09 AM
Sanjeev Kumar Jaiswal
Sanjeev Kumar Jaiswal - avatar
3 Answers
+ 13
div { position:relative; } text { position: absolute; bottom: 0; } Many ways to do that, this is just my solution. ;)
7th Jun 2017, 9:13 AM
Maz
Maz - avatar
+ 11
div { width:100px; height:100px; display:table; } text { display:table-cell; vertical-align:bottom; } /* Second way to do that */ /* * * For the rest search on Google, * i repeat... there are different ways * for do the same thing. * */
7th Jun 2017, 9:18 AM
Maz
Maz - avatar
+ 1
Please tell any other way
7th Jun 2017, 9:18 AM
Sanjeev Kumar Jaiswal
Sanjeev Kumar Jaiswal - avatar