Advertisement
MrSomFeRGO

84

Jan 18th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.24 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta charset="utf-8">
  5.         <title>Learning CSS</title>
  6.         <style>
  7.             .flex-box {
  8.                 width: 500px;
  9.                 height: 50px;
  10.                 border: 1px solid black;
  11.                 display: -webkit-flex;
  12.                 display: flex;
  13.                 -webkit-flex-direction: row;
  14.                 flex-direction: row;
  15.                 -webkit-justify-content: center;
  16.                 justify-content: center;
  17.                 -webkit-align-items: center;
  18.                 align-items: center;
  19.             }
  20.            
  21.             .item {
  22.                 border: 2px solid green;
  23.                 text-align: center;
  24.                 padding: 5px;
  25.             }
  26.             #first{
  27.                 flex: 2 100px;
  28.                 -webkit-flex: 2 100px;
  29.             }
  30.             #second{
  31.                 flex: 3 100px;
  32.                 -webkit-flex: 3 100px;
  33.             }
  34.             #third{
  35.                 flex: 4 100px;
  36.                 -webkit-flex: 4 100px;
  37.             }
  38.         </style>
  39.     </head>
  40.     <body>
  41.         <div class="flex-box">
  42.             <div id="first" class="item">Div1</div>
  43.             <div id="second" class="item">Div2</div>
  44.             <div id="third" class="item">Div3</div>
  45.         </div>
  46.     </body>
  47. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement