How to Set an Image to Transparent Using HTML Code
HTML code lets you modify certain elements of the images on your website. You can apply transparency to an image using a style attribute in the image element. Internet Explorer and Firefox require different properties. IE uses "filter:alpha(opacity=x)," where "x" is a number between 0 and 100. Firefox uses the "opacity:x" property, where "x" is a decimal between 0.0 and 1.0. For both codes, the lower the number, the stronger the transparency.
Instructions
-
-
1
Open the file that contains the image you want to make transparent. Insert the cursor in the image element.
-
2
Type the following inside the element: style="filter:alpha(opacity=50); opacity:0.5." The "filter:alpha(opacity=50);" part works with Internet Explorer, while the "opacity:0.5" works with Firefox.
-
-
3
Save the file and upload it to your server.
-
1