Advertisement
Guest User

Div error

a guest
Mar 29th, 2019
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. index.html:
  2. <!DOCTYPE html>
  3. <head>
  4. <title>Flexbox Layout Test</title>
  5. <link rel="stylesheet" href="style.css">
  6. </head>
  7.  
  8. <body>
  9. <div class="gallery_head">
  10. <h2>Flexbox Gallery</h2>
  11. </div>
  12.  
  13.  
  14.  
  15. <section class="gallery-links">
  16. <div class="wrapper">
  17.  
  18. <div class="gallery-container">
  19. <a href="#">
  20. <div></div>
  21. <h3>Picture Title</h3>
  22. <p>Picture paragraph</p>
  23. </a>
  24. </div>
  25. <div class="gallery-container">
  26. <a href="#">
  27. <div></div>
  28. <h3>Picture Title</h3>
  29. <p>Picture paragraph</p>
  30. </a>
  31. </div>
  32. <div class="gallery-container">
  33. <a href="#">
  34. <div></div>
  35. <h3>Picture Title</h3>
  36. <p>Picture paragraph</p>
  37. </a>
  38. </div>
  39. <div class="gallery-container">
  40. <a href="#">
  41. <div></div>
  42. <h3>Picture Title</h3>
  43. <p>Picture paragraph</p>
  44. </a>
  45. </div>
  46. <div class="gallery-container">
  47. <a href="#">
  48. <div></div>
  49. <h3>Picture Title</h3>
  50. <p>Picture paragraph</p>
  51. </a>
  52. </div>
  53. <div class="gallery-container">
  54. <a href="#">
  55. <div></div>
  56. <h3>Picture Title</h3>
  57. <p>Picture paragraph</p>
  58. </a>
  59. </div>
  60. <div class="gallery-container">
  61. <a href="#">
  62. <div></div>
  63. <h3>Picture Title</h3>
  64. <p>Picture paragraph</p>
  65. </a>
  66. </div>
  67. <div class="gallery-container">
  68. <a href="#">
  69. <div></div>
  70. <h3>Picture Title</h3>
  71. <p>Picture paragraph</p>
  72. </a>
  73. </div>
  74.  
  75. </div>
  76.  
  77. </section>
  78. </body>
  79.  
  80. style:
  81. * {
  82. margin: auto;
  83. padding: 0;
  84. border-radius: 15px;
  85. }
  86.  
  87. body {
  88. background-color: black;
  89. }
  90.  
  91. .gallery_head {
  92. background-color: white;
  93. text-align: center;
  94. width: 80%
  95. }
  96.  
  97. .wrapper {
  98. width: 80%;
  99. Height: 100;
  100. background-color: white;
  101.  
  102. display: flex;
  103. flex-wrap: wrap;
  104. flex-direction:row;
  105. /*flex-flow: row wrap; <-- This contains both "flex-wrap: wrap" and "flex-direction:row"*/
  106. justify-content:space-between;
  107. }
  108.  
  109. .gallery-container a div {
  110. width: 100%;
  111. height: 235px;
  112. background-color: lightgrey;
  113. background-position: center;
  114. background-repeat: no-repeat;
  115. background-size: cover;
  116. }
  117.  
  118. /* Efectos tontos */
  119. .gallery-container a:hover {
  120. box-shadow: 0 0 4px rgba(0, 140, 186, 0.8);
  121. }
  122. /* Fin efectos tontos */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement