HomeОбразованиеRelated VideosMore From: BrianWoodTraining

Use CSS to Vertically align text in a box

51 ratings | 14750 views
Use CSS to Vertically align text in a box. Using two methods, I'll show you how to align using the CSS property "line-height" or positioning to align content (text) vertically in a div. https://www.facebook.com/AskBrianWood https://twitter.com/askbrianwood http://brianwoodtraining.com
Html code for embedding videos on your blog
Text Comments (10)
Jia Ruochen (1 year ago)
such a easy thing but my teacher just couldn't explain it...
Georgi Georgiev (3 years ago)
Thank you very much. GOD bless you.
Keren Alouf (3 years ago)
I was trying for so long and you explained it in such a simple and clear manner. Thank you so much, finally I can move on...
Ray Tejada (4 years ago)
I really hope you can answer this. thank you.
Ray Tejada (4 years ago)
Great Tut! but i have a question, how do you position a div/img in the middle of a responsive div set to for example 80% width? heres a simple sample css: .wrapper{ width:100%; margin:0; padding:0; } img{ width:100%; (how can i center this?) I tried using margins but it won't work if i resize the browser to 320 width }
Jonas Bohlin (5 years ago)
Thank Yoooooou!
MrHurricaneTracker (5 years ago)
very nice thanks for the help.
IncreDenzel (5 years ago)
honestly, thank you soooooo much sir, ive been stressing so hard just to find a video which explains text alignment (and images in my case) and this is the only decent video i found, cheers!
Blue Sheep Gaming (6 years ago)
line-height put my text in the middle of the screen.
Thank you for your quick tip, it helps me a lot :)

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.