Align a banner to center - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Banner

Description

Align a banner to center

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <style type="text/css">
.promo_top{ float:left; width:100%; height:300px; text-align:center; overflow:hidden;
background-image:url(https://www.java2s.com/style/demo/Opera.png);
background-position:top center;
background-repeat:no-repeat;}

      </style> 
   </head> 
   <body> 
      <div class="promo_top"> 
      </div>  
   </body><!--from w  ww .j  a  v a  2 s .  c om-->
</html>

Related Tutorials