![]() In some of old web browsers such as Firefox 9 (in which I've tested), the flex container. Vendor prefixed / old flexbox syntax omitted in the posted snippet due to brevity, but exist in the online example. Important notes (Considered in the demo):Ī percentage values of height or min-height properties is relative to the height of the parent element, therefore you should specify the height of the parent explicitly. Min-height: 100vh /* These two lines are counted as one :-) */ Min-height: 100% /* Fallback for browsers do NOT support vh unit */ I'd use vertical-center class name for instance. jumbotron to achieve the vertical alignment. Note: it's better to use an additional class instead of altering. In the following I'll show you how to do that in only 3 lines of text (regardless of old flexbox syntax). Therefore we'd need to use some hacks/polyfills or different approaches for IE8/9. Nowadays, this method is supported in a wide range of web browsers except Internet Explorer 8 & 9. Vertical alignment is now very simple by the use of Flexible box layout.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |