CSS Background Opacity
- html and css - Below is one of the problem in html & css. Expected output is to make the background of the html element with opacity 0.4 and the text should have 100% opacity. Instead they both have an opacity 0.4. Can we achieve it?
- This solution for this html5 css is different and inconvenient if they didn’t.
- You can use a translucent png for your background image using your css html, or use an RGBa (a for alpha) color for your background color.
- Example, 50% faded black background:
html code :
- The following solution is most useful to solve your problem
css in html
- This is assuming you are required to have a semi-transparent image btw, and not a color (which you should just use rgba for).
- Also assumed is that you can't just alter the opacity of the image beforehand in photoshop.
- The following methods can be used to solve your problem
- CSS Aplha Transparency Method (doesn't work in IE 8)