Advertisement
Guest User

Flexbox example 1

a guest
Sep 16th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <style>
  2. .container {
  3. background: blue;
  4. display: flex;
  5. flex: 1;
  6. height: 100vh;
  7. flex-direction: row;
  8. align-items: center;
  9. justify-content: center;
  10. }
  11. .box1 {
  12. display: flex;
  13. background: red;
  14. height: 100vh;
  15. flex: 2;
  16. }
  17. .box2 {
  18. background: yellow;
  19. display: inherit;
  20. height: 100vh;
  21. flex-direction: column;
  22. flex: 10;
  23. }
  24. .box3 {
  25. display: flex;
  26. background: green;
  27. flex:1;
  28. }
  29. .box4 {
  30. display: flex;
  31. background: purple;
  32. flex:3;
  33. }
  34. .boxBottom {
  35. display: flex;
  36. background: green;
  37. flex:4;
  38. }
  39. .boxTop {
  40. display: flex;
  41. background: orange;
  42. align-items: center;
  43. justify-content: center;
  44. }
  45.  
  46. </style>
  47. <div class='container'>
  48. <div class='box1'></div>
  49.  
  50. <div class='box2'>
  51. <div class='boxTop'>
  52. Test Test
  53. Test
  54. Test
  55. Test
  56. Test
  57. Test
  58. Test
  59. Test
  60. Test
  61. Test
  62. <br>
  63. Test
  64. </div>
  65. <div class='boxBottom'>
  66. <div class='box3'> </div>
  67. <div class='box4'></div>
  68. </div>
  69. </div>
  70.  
  71.  
  72. </div>
  73.  
  74. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement