Lately, I've been struggling to find a solution to my issue. Here's the problem: When I download an Instagram post in PNG or JPG format and add it to my CSS with background-size: cover, the images tend to get cut off when the screen size is reduced or viewed on a standard PC resolution of 1920 x 1080. I want the entire image to be displayed, not just a portion of it.
Here is the HTML code:
<div class = "ideas-grid">
<!--Idea grid item 10-->
<a href="https://www.instagram.com/p/andherewouldbethelinktothepost" target="_blank">
<div class="idea-grid-item number-10">
</div>
</a>
</div>
The anchor link directs users to the post when clicked. Below is the CSS code:
.number-10{
background: url(../images/izaellelovely.jpg);
background-size: cover;
}
.ideas-grid a{
transition: 600ms;
}
.ideas-grid a:hover{
background-color: #eb648c;
}
I want the image to display fully at any screen size without being cropped to fit the grid or anchor tag dimensions. The current setup restricts the image size even if there is room for it to expand. How can I modify the code to show the complete image?