If you need only the background of your translucent div, and not some text and elements inside it, you can simply set the background color to transparent (for example, with alpha-1).
For example, our site , the example below:
<html>
<head>
<title>Transparency test</title>
<style type="text/css">
body {
background-image: url(http://www.fencing-game.de/style/background6.png);
}
#trans {
background-color: rgba(255,0,0,0.5);
max-width: 80ex;
}
p {
max-width: 70ex;
margin: auto;
}
#nontrans {
background-color: rgb(255,255, 0);
}
</style>
</head>
<body>
<div id="trans">
<p>normal text</p>
<p id="nontrans">nontransparent</p>
<p>normal text</p>
</div>
</body>
source
share