Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> .center { display: flex; justify-content: center; align-items: center; height: 200px; border: 3px solid green; } </style> </head> <body> <h1>Centering</h1> <p>A container with both the justify-content and the align-items properties set to <em>center</em> will align the item(s) in the center (in both axis).</p> <div class="center"> <button>Centered Button</button> </div> </body> </html>