Select Page

Blog post 3

Something I see asked so often and is actually really simple is how to vertically center content. Like when you have some text next to an image but the text doesn’t fill the whole space, you want it to sit in the vertical center of the column rather than at the top.

You can do this with padding to an extent but this can throw your layout off on smaller screens if you don’t add some media queries and of course FireFox doesn’t always play nice with percentages which you need to use for responsiveness.

Adding a custom CSS class to your stylesheet means you can vertically center any content in a matter of seconds.

So let’s get cooking!

Ved at fortsætte med at bruge denne side, accepterer du brugen af vores veganske og glutenfri cookies - Læs mere

Cookie-indstillingerne på dette website er sat til at tillade cookies, hvilket giver dig den bedst mulige oplevelse. Hvis du fortsætter med at bruge denne hjemmeside uden at ændre dine cookie-indstillinger, eller hvis du klikker "OK" så accepterer du brugen af disse cookies. Bare rolig - de er fedtfattige og glutenfri.