Menu
Web Host Pro Logo
  • Home
  • News
  • Servers
  • Websites
  • WordPress
  • Business
Web Host Pro Logo
July 15, 2011

How to make transparent layer over an image

Share it here

We wanted to put a image over everything on a web page, so we searched and searched the web until we finally found this simple little code:

<div>
<img src=”/images/404a.png” alt=”” style=”position:absolute;” />
<div style=”position:absolute;width:Xpx;height:Ypx;background-color:#000000;filter:alpha(opacity=0);opacity:0;-moz-opacity:0;”></div>
</div>

It’s great, just throw this about anywhere in the body of the web page and it will create a layer over place for your image. Now just use a transparent image like the one we used here and play around with placement and image size to make it fit correctly.

Here’s the code again in case the image is blocking you from grabbing it:

<img src=”/images/404a.png” alt=”” style=”position:absolute;” />
<div style=”position:absolute;width:Xpx;height:Ypx;background-color:#000000;filter:alpha(opacity=0);opacity:0;-moz-opacity:0;”>

Connect with us

Web Host Pro websites, vps, and servers

Recent Posts

  • Choose Your Adventure: Website Building

    Choose Your Adventure: Website Building

  • Launch and Grow Your Business with Web Host Pro’s Digital Business Concierge

    Launch and Grow Your Business with Web Host Pro’s Digital Business Concierge

  • Introducing Web Host Pro’s Free Network & IP Diagnostic Tool

    Introducing Web Host Pro’s Free Network & IP Diagnostic Tool

  • Grow Your Business with Four Free Internet Marketing PDFs

    Grow Your Business with Four Free Internet Marketing PDFs

  • How to Use Backuply on WordPress for Simple, Reliable Website Backups

    How to Use Backuply on WordPress for Simple, Reliable Website Backups

  • Ten Steps to Starting a Business in Arizona

    Ten Steps to Starting a Business in Arizona

  • Website SEO Search, Ping, & Directory Submission Service, all for $19.99!

    Website SEO Search, Ping, & Directory Submission Service, all for $19.99!

  • Krita vs. GIMP

    Krita vs. GIMP

  • AI Music

    AI Music

  • How Important Is Domain Privacy?

    How Important Is Domain Privacy?

  • Automating Social Media Posting

    Automating Social Media Posting

  • How to Start a Website (Even If You Have No Clue What You’re Doing)

    How to Start a Website (Even If You Have No Clue What You’re Doing)

  • 7 Reasons to Switch to Web Host Pro

    7 Reasons to Switch to Web Host Pro

  • Celebrating 25 Years of Web Host Pro: A Journey of Innovation, Growth, and Success

    Celebrating 25 Years of Web Host Pro: A Journey of Innovation, Growth, and Success

  • Massive Data Center Upgrade Finished!

    Massive Data Center Upgrade Finished!

Log in
©2025 Web Host Pro