Absolute Positioning Image center - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image

Description

Absolute Positioning Image center

Demo Code

ResultView the demo in separate window

<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>

Related Tutorials