Jump to content

Opacity


glenelkins

Recommended Posts

If i set opicity to say 0.7 on a container, then add elements on top of this, the new elements seem to inherit the opacity as well. I have set the elements on top of the container to opacity: 1 and filter: alpha(opacity:100)  but they still seem to inherit the 0.7 alpha from their container

 

 

Link to comment
https://forums.phpfreaks.com/topic/161649-opacity/
Share on other sites

The inheriting container will also have a maximum opacity of its container. You can use an absolutely positioned div to sort this.

 

<div><!--main div should be set to position: relative-->
<div><!--opacity set to 0.7. specify a width and height-->
</div>
<div>
	<!--set to position: absolute.
	if you set background to transparent
	you'll have solid text-->
</div>
</div>

Link to comment
https://forums.phpfreaks.com/topic/161649-opacity/#findComment-852954
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.