![]() Here’s the related CSS code, that will make our paragraph vertically (and horizontally) centered: ![]() To make it work, we need two containers in our HTML: The following examples use a div as a parent, and a paragraph containing the text I want to vertically align: This is an interesting technique, as it allows you to easily center vertically any HTML element: Paragraphs, images, etc. CSS Vertical Align Using The Transform Property Unfortunately, CSS Flexbox isn’t supported by IE9 and earlier versions. This technique is very reliable and works well in a responsive web design context.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |