Log in

View Full Version : Resolved Transparency in DIV



balki
08-13-2016, 05:44 PM
Hello!
I have an image as the background of the text. I use this code:

<style type="text/css">
.bgimg {
background: #ffffff url("...") no-repeat right top;
margin-right: 100px;
}
</style>

<div class="bgimg">
bla-bla
</div>
Unfortunately the rest of the background becomes white. You can see it on this page: http://nicolacoins.blogspot.bg/p/blog-page_13.html

How to preserve transparency? :)

Beverleyh
08-13-2016, 05:55 PM
Don't define the background as white. In other words, take out the #ffffff hexadecimal colour value.

jscheuer1
08-13-2016, 06:28 PM
Yes, or you can even specify transparent:


<style type="text/css">
.bgimg {
background: transparent url("...") no-repeat right top;
margin-right: 100px;
}
</style>

balki
08-13-2016, 07:35 PM
Oh, I'm so stupid. Many many thanks to both of you! :rolleyes: Worked beautifully!