HTML CSS examples for CSS Widget:Image
Absolute Positioning Image center
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #header-text {<!--from w w w . j a v a2 s . co m--> margin:0; display:block; text-align:center; padding:11px; border:2px solid Chartreuse; width:100%; } #logo { width:100%; height:100px; text-align:center; margin-top:0px; } </style> </head> <body> <h1 id="header-text">test</h1> <div id="logo"> <img id="logo-img" src="https://www.java2s.com/style/demo/InternetExplorer.png" alt="dog"> </div> </body> </html>