Reputation: 597
I want to make rounded cornes on this background images. But it seems to effect the div box instead.
<div class="watermark">
<div class="watermark-image" style="background-image:url({{blogthreadlist.blogUri}});"></div>
<div class="col-md-12">Something else</div>
<div class="col-md-12">Something more..</div>
<div class="col-md-12">Something at the end</div>
.watermark {
display: block;
position: relative;
}
.watermark-image {
content: "";
opacity: 0.2;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
z-index: -1;
}
How do I round the cornes of the images and not the div box? The div i larger than the picture..
Upvotes: 0
Views: 59
Reputation: 32315
You can have a separate <img>
tag for the image and set a border-radius
<div class="watermark-image"><img class="rounded-img" src="{{blogthreadlist.blogUri}}"></img></div>
CSS
.rounded-img {
border-radius: 3px;
}
Upvotes: 1
Reputation: 61
Use this
.watermark-image {
content: "";
opacity: 0.2;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
z-index: -1;
border-radius:50px;
}
Upvotes: 0