So I am working on a front end website with React/HTML/CSS to mimic a wireframe design and am curious about achieving the desired effect below where the border breaks just behind the image placement over it. Perhaps there is a trick I can do with the image to give it a similar texture and color as the background image, but I would prefer to use code to achieve the effect. Any ideas on how to achieve this? Is this possible?
Relevant CSS:
.middle-logo {
width: 100%;
height: auto;
max-width: 125px;
}
.negative-top-margin {
margin: -50px 0px 0px 0px;
}
.bg-image-container {
position: relative;
text-align: center;
}
.bg-image {
/* The image used */
background:
/* top, transparent red, faked with gradient */
linear-gradient(
rgba(68, 105, 126, 0.788),
rgba(68, 105, 126, 0.788)
),
/* bottom, image */
url("https://firebasestorage.googleapis.com/v0/b/theblairfamilyfoundation-org.appspot.com/o/nature.png?alt=media&token=f2dc74ac-bb80-4847-9345-f47346f736de");
/* Full height */
height: 700px;
/* Center and scale the image nicely */
background-position: 50% 35%;
background-repeat: no-repeat;
background-size: cover;
}
/* Position text in the middle of the page/image */
.bg-content {
color: white;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 2;
text-align: center;
width: 75%;
}
.bg-content:before {
content: " ";
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 100%;
border: 1px solid white;
}
.bg-h1 {
font-size: 2.5em;
margin: 0;
}
.bg-p {
font-size: 1.2em;
}
.bg-text-box {
padding: 50px 0 50px 0;
}
Design to achieve: