We've all been there: you're working on a website and need to display a row of logos—clients, partners, sponsors—you name it. However, logos come

Building the Perfect Logo Strip

submited by
Style Pass
2024-10-04 11:30:12

We've all been there: you're working on a website and need to display a row of logos—clients, partners, sponsors—you name it. However, logos come in all shapes and sizes, and making them look good together can be quite challenging. How do you get them to play nice and look visually appealing without spending hours tweaking each one?

Note: All the logos are wrapped in an additional div (.logo). This is because we want a plain block element without intrinsic sizing, which images with width and height attributes typically have. By setting the height on the outer div and giving the image a height of 100% and width of auto, we ensure consistent sizing across all logos.

While this approach is easy to implement, it doesn't always yield a visually balanced logo strip. Wide logos might appear too big.

To create a more harmonious logo strip, we can adjust the height of each logo based on its aspect ratio. If a logo is significantly wider than it is tall (aspect ratio greater than one), we'll reduce its height accordingly. The wider the logo, the smaller its allowed height. This way, all logos maintain a visual balance.

Leave a Comment