HTML CSS examples for CSS Widget:Image Text
Center image and text inside a div
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .leave-comment {<!-- w w w. ja va 2 s .co m--> background:Chartreuse; clear:both; font-size:2.5em; padding:21px 0; text-align:center; height:201px; } .comment-bubble { background:url('https://www.java2s.com/style/demo/Google-Chrome.png') no-repeat left center; display:inline-block; height:25px; width:27px; margin-right:11px; } a { line-height:201px; } </style> </head> <body> <div class="leave-comment"> <a href="example-video-8/" rel="bookmark" title="Leave a comment for Example Video 8"> <span class="comment-bubble"></span>Lorem ipsum dolor sit amet, consectetu</a> </div> </body> </html>