I was creating a website which has menu and has a class topbar and has white background and i want to make it transperent not fully but still i can see a whit color i am using a dreamweaver so how do I do it
<html>
<head>
<title></title>
<style type="text/css">
a{
text-decoration:none;
color:black;
}
a:hover{
text-decoration:underline;
}
ul{
list-style:none;
}
li{
float:left;
font-size:20px;
padding-left:10px;
}
.background{
margin:0;
background-image:url("MWYLJ6SRDM.jpg");
background-size:1380px auto;
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center;
}
.topbar{
background-color:white;
height:50px;
width:100%;
color:black;
position:fixed;
z-index:1;
}
</style>
</head>
<body class="background">
<div class="topbar">
<ul>
<li><a href="">Home</a></li>
<li><a href="">About Us</a></li>
<li><a href="">Contact Us</a></li>
</ul>
</div>
</body>
</html>
You can use:
background-color:rgba(255, 255, 255, 0.5);
The "0.5" value in example means opacity value and you can adjust transparency in there. Other values means RGB values, so you can adjust background color with them.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments