Answer by Nasser Torabzade for Centering an image larger than browser window, which can then be used as a rollover image

You can set your image as a centered background of a div:

<!DOCTYPE html>
  <head>
    <style>
      body{
        overflow-x: hidden;
      }
      #bigImage{
        background:url('sitewide.png') no-repeat top center;
        width: 2880px;
        height: 540px;
      }
    </style>
  </head>
  <body>
    <div id="bigImage"></div>
  </body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *