Jump to content

How to hide image background


newcoder1010

Recommended Posts

Hi,

html:

<div class="div2">
<h3>Get A GUARANTEED Fair All Cash Offer</h3>
<p >Let us make a fair all-cash offer on your house.</p>
<p><img class="img1" title="Arrow Right" src="cornflowerblue.png">No hassles.&nbsp;No obligation.</p>
<h3>Just Complete This Quick Form!</h3>
</div>

CSS:

 .div2 {
    color: #ededf1;
    background: #35302b;
    opacity: .8;
}
img {
    margin: 5px 0 15px 15px;
    float: right;
    background-position: initial; // did not work
  background-image: none; // did not work
  background-color: none;  // did not work
}

Img has white background with blue color arrow. I only like to display blue arrow. Please advise.

Link to comment
Share on other sites

I simply created the image of blue arrow with white background. After that no transparent applied to the image. 
This is my site trying to hide the white background and just display the arrow.

Image address .

If you visit this page Example site. and then right click the logo image on top left corner > select "open image in new tab", you will notice that original image has white background but white background does not show in the main page. 

Link to comment
Share on other sites

The image on that example site is transparent. Download it and open it in a proper image editor.

You can't selectively remove the white parts from your image using CSS. You have to erase it using an image editor.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...