I have to do one task in html and CSS and I have a problem with showing background in one div (id of div TRANSPARENT_DIV). It should be looks like a div is transparent (I added image).
It's not so easy because adding 'opacity' to our 'TRANSPARENT_DIV' shows background another div.
If you have any idea how to solve this problem I would be grateful.
<head>
<style>
body {
margin: 0;
padding: 0;
background-image: url("https://i.redd.it/zrkwrcj7tbv31.jpg");
background-repeat: no-repeat;
background-color: #cccccc;
background-size: 100% auto;
font-family: "Roboto-Medium", "Verdana", sans-serif !important;
}
.page-wrapper {
margin: 0 60px;
border: 1px solid blue;
background-color: white;
}
</style>
</head>
<body>
<h1 style="text-align: center;">
TITLE
</h1>
<div style="background-color: white; height: 40px; width: 100%; text-align: center;">
<a style="line-height: 40px; margin: 0 55px;" href="#"><span>Link 1</span></a>
<a style="line-height: 40px; margin: 0 55px;" href="#"><span>Link 2</span></a>
<a style="line-height: 40px; margin: 0 55px;" href="#"><span>Link 3</span></a>
</div>
<div style="background-color: white; height: 40px; width: 100%; text-align: center; border: 1px solid black;">
breadcrumbs here
</div>
<div class="page-wrapper">
<div style="margin: 40px; border: 1px solid black;">
<div id="TRANSPARENT_DIV" style="height: 250px;"> <h3> Here should visible part of image from background. </h3> </div>
</div>
<div style="margin: 0 40px; border: 1px solid black;">
Some content
</div>
</div>
</body>
Example image how it should looks
Example:
<div id="TRANSPARENT_DIV" style="height: 250px; background-color: rgba(255, 255, 255, 0.0);"> <h3> Here should visible part of image from background. </h3> </div>
It doesn't work because this solution shows parent's background.
Greetings