Translucent Navbar

I have set my nav bar to remain on top of the page content.

Now I also want it to be translucent and have the page content shine trough the navbar when scrolling the page.

So I tried this code and it works 90%.
Problem is, this code somehow makes buttons and forms on the page scroll over the nav bar (without the custom code it scrolls beneath it like it should).

Here’s the css styling I used:

#div-id {
  opacity: 0.99 !important;

Also tried below css code but that didn’t do anything:
background-color: rgba(255, 255, 255, 0.99);

Anyone knows how to fix this?

Figured out that adding these works!

position: fixed;  
z-index: 1000;