Css does not change color to transparent

Asked

Viewed 142 times

1

I have a menu of a site where specifying the element I change to a transparent color but it does not change, even putting as ! Port in front of the property. Behold: inserir a descrição da imagem aqui

In this menu it is like this in my style.css

.navigation{
height:50px;
background:rgba(243, 241, 245, 0.04) !important;
-webkit-box-shadow:0 0 3px rgba(0,0,0,.4);
-moz-box-shadow:0 0 3px rgba(0,0,0,.4);
box-shadow:0 0 3px rgba(0,0,0,.4);
-webkit-border-radius:0 0 4px 4px;
-moz-border-radius:0 0 4px 4px;
border-radius:0 0 4px 4px;
z-index:2;
text-align:center;
font-family: 'Roboto Condensed', sans-serif;
position:absolute;
top:0;
}

in the background this already in transparent even more so, when I reload the page it goes back to the color :

    background: #f8f7f3;

inserir a descrição da imagem aqui

Does anyone have any idea why you don’t hold the rgb value I put?

  • 2

    transparent and background: rgba(0, 0, 0, 0);

  • Not all well more even I putting rgba(0, 0, 0, 0); it still does not stay. It seems that there is another rule behind

  • put the code a little weird

  • More my css has 3000 lines. so I put it there only where it accuses when I inspect the element. take a look at the navigation class

  • Clears the cache. xD

  • html in the area you are using;

  • I cleared the cache and nothing

  • Ops, man. When you spoke to me in html, I had the idea to apply in the own page where is my menu. now yes.

  • @user There is a difference between "transparent" and "invisible".

  • @Dvdsamm does exist but if you leave the .navigation invisible will disappear his menu.

  • @user But he wants an alpha 0.04. If you put 0 in alpha will be completely transparent and invisible.

  • @Dvdsamm the background will be completely transparent.

Show 7 more comments

2 answers

1

You can put the CSS inline direct in the element with style. This ignores all references of the style background element from some CSS:

<div class="navigation" style="background:rgba(243, 241, 245, 0.04);"></div>

0


To resolve this issue, on the page where the menu is incorporated, apply the transparence by calling Chasse for the menu. see:

<style>
.navigation{
    background:rgba(243, 241, 245, 0.04) !important;
}
</style> 

Thus forcing css to apply the last rule made on the page where the menu is.

Browser other questions tagged

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