HTML CSS examples for CSS Widget:Image Text Position
position image next to text with padding
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> h2 {<!--from w ww. j ava 2 s . c o m--> overflow:auto; } h2 span { float:left; margin-top:11px; margin-left:11px; } h2 img { float:left; } </style> </head> <body> <h2> <img src="https://www.java2s.com/style/demo/Google-Chrome.png" height="75px"> <span>Lorem ips</span> </h2> </body> </html>