Advertisement
softword

Center div vert horiz

Nov 20th, 2015
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.41 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <style>
  5.         .container {
  6.             background-color: red;
  7.             display: flex;
  8.             align-items: center;
  9.             justify-content: center;
  10.             width: 250px;
  11.             height: 250px;
  12.         }
  13.         .box {
  14.             border: 1px solid #FFFFFF;
  15.             background-color: yellow;
  16.         }
  17.     </style>
  18. </head>
  19. <body>
  20.     <div class="container">
  21.         <div class="box">
  22.             <span class="text">Ciao</span>
  23.         </div>
  24.     </div>
  25. </body>
  26. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement