Skip to content

Commit 1633c44

Browse files
fix image overflow
Signed-off-by: saurabhraghuvanshii <saurabhsraghuvanshi@gmail.com>
1 parent bb97a12 commit 1633c44

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/components/Card/Card.style.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,25 @@ export const CardWrapper = styled.div`
6464
height: 100%;
6565
margin-top: 0;
6666
transition: all 0.3s ease-in;
67+
display: flex;
68+
align-items: center;
69+
justify-content: center;
6770
}
6871
69-
img {
72+
.gatsby-image-wrapper > div,
73+
.old-gatsby-image-wrapper > div {
74+
height: auto;
7075
width: 100%;
71-
height: 100%;
76+
}
77+
78+
.gatsby-image-wrapper img,
79+
.old-gatsby-image-wrapper img {
80+
max-height: 100%;
81+
width: auto;
7282
display: block;
73-
object-fit: cover;
83+
object-fit: contain;
7484
object-position: center;
75-
margin: 0;
85+
margin: 0 auto;
7686
}
7787
7888
@media screen and (max-width: 768px) {

0 commit comments

Comments
 (0)