Am trying to display a photo like this on a webpage:
If anyone knows an easier way to achieve this, please share. This is what I have so far:
.border-box{
height: 300px;
margin-top: -65%;
width: 75%;
float: right;
margin-right: -8%;
border-bottom: 2px solid #004689;
border-right: 2px solid #004689;
background: #004689 0% 0% no-repeat padding-box;
opacity: 1;
}
<div class="about-us-body-img">
<div class="about-img"><img src="https://picsum.photos/200"></div>
<div class="border-box"></div>
</div>
This works really fine guys but my problem is, am not able to use % for the .border-box height value(like I have with the width). So when I use 300px, its not responsive and on small screens, the border becomes like three times larger than the image.
How can I use % in the height value or how can I make the height responsive respectively with every screen size? Or is there an easier way to achieve the whole thing?
