Menu
whm logo
  • News
  • Websites
  • Business
  • Servers
  • Services
    • CPanel Hosting
    • EZ Website Builder
    • VPS Hosting
    • Dedicated Servers
    • Reseller Hosting
    • Domain Registrstion
whm logo
July 15, 2011

How to make transparent layer over an image

Share it here
twitter facebook pinterest linkedin

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

Leave a Reply Cancel reply

You must be logged in to post a comment.

Connect with us
twitter facebook instagram youtube pinterest linkedin

Recent Posts

  • Internet usage around the World 2009-2028 (revised)

    Internet usage around the World 2009-2028 (revised)

  • Impostor scams are on the rise

    Impostor scams are on the rise

  • How to make an awesome about us page

    How to make an awesome about us page

  • Is AI taking over SEO?

    Is AI taking over SEO?

  • Transferring domains can be easy

    Transferring domains can be easy

  • 6 highly effective ways to market a small business online

    6 highly effective ways to market a small business online

  1. Missouri University of Science and Technology on Free Domain Privacy!May 6, 2023

    Missouri University of Science and Technology [...]Here is a good Weblog You may Discover Intriguing that we Encourage You[...]

  2. albertdavid123 on MySQL 5.5 is officially dying this weekApril 3, 2019

    Good bye 5.5. And thanks for we explaining the password change steps.

  3. Web Host Pro on Proper computer postureDecember 1, 2015

    Thanks!

  4. frank on 85% of people use the internet to find local businessesAugust 8, 2015

    I always do!

  5. Danny Walton on Free word invoice templateJuly 4, 2014

    Nice download

All Rights Reserved Web Host Pro 2023