HTML CSS examples for CSS Widget:Image Text
Vertical multiline text and image line up
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container {<!--from w w w . j a v a 2 s . c o m--> text-align:center; width:601px; margin:auto; border:2px solid Chartreuse; } .container span { display:inline-block; vertical-align:middle; } .container #text { border:2px solid yellow; } .cv { display:table; margin:0 auto; text-align:left; } .photo { border:2px solid blue; } </style> </head> <body> <div class="container"> <span> <div class="photo"> <img src="https://www.java2s.com/style/demo/Google-Chrome.png" alt="dummy"> </div> </span> <span id="text"> <div class="cv"> <p>Lorem ipsum<br>Lorem ipsum dolo<br>Lorem ips<br> </p> </div> </span> </div> </body> </html>