Archived topic
Finding it hard to give images a uniform container size or set width and height
3 replies · Started by Oisin on October 11, 2020
Hi Guys,
I'm building out a custom WooCommerce account page using Generate Blocks. I'm an image and Headline combo but want to fix the height and width of the images so the Headlines appear in line.
I've added a custom class to the grid containers but no luck, then to the images themselves but no luck.
.my-account-icons img {
width: 80px
height: 80px;
}
Can you tell me what I'm doing wrong and how to fix it? Once I know the mistake I've been making I can make sure I don't do it again.
Many thanks,
Oisín.
For starters, the CSS syntax for width: 80px is missing a ;. This may sometimes cause issues.
Your code should look something like this.
.my-account-icons img {
width: 80px;
height: 80px;
}
Also, only the "recent orders" icon had the .my-account-icons as shown here.
https://share.getcloudapp.com/X6udN80q
If you want it applied on the other icons, make sure the other ones have the .my-account-icons class too.
Thanks Elvin,
I only added it to that first one to test it. I can't believe I missed the syntax error!
It's working fine now, thanks for your help.
Kind regards,
Oisín.
Good to know.
No problem.:)