Currently, I have a website where images are clashing with the text over it.
I'm new to HTML/CSS and have looked around online but haven't ha dmuch luck. Basically, when a user isn't hovered over a box, an image should show a bit faded with text on top. When the use is hovered over the box, the image should be?
.showcase {
overflow: hidden;
margin-left: -1px;
@include flexbox;
@include justify-content(center);
}
.custom_showcase {
position: relative;
padding: 1px 0 0 1px;
@include flexbox;
img {
width: 100%;
max-width: none;
}
.inside {
display: inline-block;
max-width: 100%;
width: 100%;
background: $color_1;
@include flexbox;
@include align-items(center);
}
.textblock {
padding: 20px;
}
img + .textblock {
position: absolute;
left: 50%;
top: 50%;
width: 100%;
max-width: 455px;
padding: 0 20px;
color: $color_3;
@include transform(translate(-50%,-50%));
}
h2 {
color: $color_3;
margin: 16px 0 5px;
text-transform: uppercase;
}
p {
margin: 0;
color: $color_3;
}
h2,
p {
span {
display: inline-block;
padding-left: 0;
@include transition(.4s);
}
}
.text {
width: 100%;
}
.btn_wrapper {
position: absolute;
right: 40px;
top: 50%;
@include transform(translate(0%,-50%));
.btn {
padding: 0 10px;
min-width: 140px;
text-align: center;
opacity: 0;
@include transition(.4s);
@include transform(translate(100%,0%));
/* border-color: $color_3; */
}
}
a:not(:hover) {
//h2,
//p {
// span {
// padding-right: 0 !important;
// }
//}
opacity: .5;
transition: opacity 0.5s ease;
}
a:hover {
h2,
p {
span {
padding-left: 0 !important;
}
}
.btn_wrapper {
.btn {
opacity: 1;
@include transform(translate(0%,0%));
}
}
}