squarespacer01 Posted November 25, 2022 Share Posted November 25, 2022 (edited) I would like to change the size of the grid image in my portfolio projects but I can't figure out how to do it. I can change the width by using the CSS code below but not the height of the project .grid-image { width: 100% !important; } Edited November 25, 2022 by squarespacer01 Link to comment
tuanphan Posted November 27, 2022 Share Posted November 27, 2022 To change height, you need to use padding-bottom .grid-image { width: 100% !important; padding-bottom: 150% !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
squarespacer01 Posted November 28, 2022 Author Share Posted November 28, 2022 17 hours ago, tuanphan said: To change height, you need to use padding-bottom .grid-image { width: 100% !important; padding-bottom: 150% !important; } Hi tuanphan, Thank you for your reply! This does change the height of the image, however the overall project block remains the same. When I hover over the project, half of it is the image and the other half is white. I have attached a screenshot of my portfolio project page so you can have a better idea of what is happening. As you can see, the adidas project is shaded because I'm hovering over it, and I reduced the padding at the bottom with the code you provided, but now the whole block is split in 2. I was wondering if there is a way to decrease that aspect ratio to a custom ratio so I can make more projects visible at once. Hope this makes sense. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment