Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove part of background/make transparent

Tags:

html

css

I'm making a menu that follows down the page, and has an 85% transparency. As it goes down the page, or an item is clicked, there will be an arrow below the name of the current DIV.
I would like this arrow to be transparent, so the user can read what is behind it. If I make it an image, and make it transparent, it just shows what is below it (The menu, obviously).
So, my question is, how do I make that part transparent?
Here's my current code:
HTML:

<div class="menu">
    <ul class="navigation">
       <li><a href="#home">Home</a></li>
       <li><a href="#aboutme">About Me</a></li>
       <li><a href="#portfolio">Portfolio</a></li>
       <li><a href="#services">Services</a></li>
       <li><a href="#contact">Contact</a></li>
    </ul>
</div>

CSS:

    .menu {
    position: fixed;
    width: 100%;
    height: 60px;
    background-image: url('images/menubg.png');

}

ul.navigation {
    list-style: none;
    text-align: center;
    font-family: 'Allerta', serif;
    text-transform: uppercase;
    font-size: 22px;
    margin: 0px;
    padding-top: 19px;
}

ul.navigation li {
    display: inline;    
}

ul.navigation a {
    color: #dcdcdc;
    margin-right: 30px;
    margin-left: 30px;
    text-decoration: none;
    padding-bottom: 35px;
}

ul.navigation a:hover {
    background-image: url('images/hover2.png');
    background-repeat: no-repeat;
    background-position: center;
}
like image 799
Joseph Duffy Avatar asked Nov 06 '22 00:11

Joseph Duffy


1 Answers

Assuming transparent arrow is what you need, Use the following CSS properties to achieve cross browser transparency support.

#arrow {
 -khtml-opacity:.50; 
 -moz-opacity:.50; 
 -ms-filter:”alpha(opacity=50)”;
  filter:alpha(opacity=50);
  filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0.5);
  opacity:.50; 
}
like image 105
Hussein Avatar answered Nov 15 '22 00:11

Hussein