Vertically-Center Anything

html, body { height: 100%; margin: 0; } body { align-items: center; display: flex; }
Note: Watch for some buggy behavior with flexbox in IE11.

1 Response

How to align centered after use float property?

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.