background-color hard to find

Asked

Viewed 32 times

2

I have the following website Slide Show

In it, there is (only) one slide show.

In the navigation part, there is a Nav tag that has a

background :rgba (0,0,0,.5)

And has two buttons with an image as background.

This image is transparent on the edges. However, a light gray background is appearing that I can’t find where it comes from.

1 answer

3


This is because the element by default has a background color.

inserir a descrição da imagem aqui

To arrange this in your css put the color transparent in the background.

OBS: note that the button also has a borda by default, and I did not withdraw just so you see that even I did not declare a border even so the user-agent of Rowse placed the edge....

.cor {
 background-color: transparent;
}
.borda {
 border: none;
}
<button> com fundo </button>

<button class="cor"> sem fundo </button>

<button class="cor borda"> sem cor / sem borda </button>

Here is a link for you to read more about the tag <button> https://www.w3schools.com/tags/tag_button.asp

  • 1

    ent]ão, thanks. It worked. but if you noticed there on the site, I reset without everything in *{} including Borders. Thanks

  • @Carlosrocha on his site he is without edge even, I just took the answer to show that the user-agent puts by default various styles in some elements. But rest assured that your * reset* is working, your btn no longer had edge even ;)

  • 1

    I get it. About that first image you posted in the answer, I had already seen in the inspector. I just couldn’t figure it out because that part of the inspector, frankly, I don’t really know it yet. I only know the inspector’s css and scripts that are programmed by the author. Not the ones that are already standard. Living and learning...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.