HTML CSS examples for CSS Widget:Image Text
have image and text side by side
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .iconDetails {<!--from w w w . j a v a2 s . c o m--> margin-left:3%; float:left; height:41px; width:41px; } .container2 { width:100%; height:auto; padding:2%; } h4 { margin:0px; } </style> </head> <body> <div class="container2"> <div> <img src="https://www.java2s.com/style/demo/Opera.png" class="iconDetails"> </div> <div style="margin-left:60px;"> <h4>Lorem ip</h4> <div style="font-size:.6em"> Lorem ipsum dolor sit amet, consectet </div> <div style="float:right;font-size:.6em"> Lorem ipsum </div> </div> </div> </body> </html>