Advertisement
adado69wcs

Flexbox

Mar 8th, 2020
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.76 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Find the precious!</title>
  6. <link rel="stylesheet" href="style.css">
  7. </head>
  8. <body>
  9. <nav>
  10. <ul>
  11. <li>FindThePrecious.com</li>
  12. <li><a href="#" class="button">Fellows</a></li>
  13. <li><a href="#" class="button">Contact us</a></li>
  14. </ul>
  15. </nav>
  16. <section>
  17. <div class="carousel"></div>
  18. </section>
  19. <section>
  20. <h2 class="fellows">Fellows wanted dead <small>(or alive if you want to eat them later)</small></h2>
  21. </section>
  22. <section class="wanted">
  23. <article></article>
  24. <article></article>
  25. <article></article>
  26. </section>
  27. <form>
  28. <h2>Contact us</h2>
  29. <input type="email" placeholder="@">
  30. <input type="text" placeholder="&#8962;">
  31. <select id="subject" name="subject">
  32. <option value="request">I have see one of them</option>
  33. <option value="request">I have many of them</option>
  34. </select>
  35. <textarea placeholder="Your message"></textarea>
  36. <div class="send-button">
  37. <button type="submit">Send !</button>
  38. </div>
  39. </form>
  40. <footer>
  41. <div>
  42. <a href="#">About Us</a>
  43. <a href="#">Fellows</a>
  44. <a href="#">Join our army</a>
  45. </div>
  46. <div>
  47. <a href="#">FAQ</a>
  48. <a href="#">Reward conditons</a>
  49. <a href="#">Legal mentions</a>
  50. </div>
  51. <div>
  52. <a href="#">Sauron4Ever.com</a>
  53. <a href="#">Follow him on twitter</a>
  54. </div>
  55. </footer>
  56. </body>
  57. </html>
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. body{
  66. margin: 0;
  67. padding: 0;
  68. width: 100%;
  69. min-height: 100%;
  70. display: flex;
  71. flex-direction: column;
  72. }
  73.  
  74. h2{
  75. font-size:2 rem;
  76. text-align: center;
  77. vertical-align: baseline;
  78. }
  79.  
  80. small{
  81. font-size: 1 rem;
  82. }
  83.  
  84. .button:hover{
  85. background-color: #3E555E;
  86. }
  87.  
  88.  
  89. nav, footer{
  90. background-color: #333B3E;
  91. }
  92.  
  93. nav ul {
  94. padding: 0px 15px 0px 15px;
  95. margin: 0;
  96. display: flex;
  97. align-items:baseline;
  98. }
  99.  
  100. nav ul li{
  101. list-style-type: none;
  102. vertical-align: top;
  103. float: left;
  104. margin-right: 10px;
  105. height: 25px;
  106. line-height: 35px;
  107. color: #fff;
  108. }
  109.  
  110. nav ul li:first-of-type {
  111. font-size: 25px;
  112. font-weight: bold;
  113. text-align: center;
  114. }
  115.  
  116. nav ul li:nth-of-type(2) {
  117. background-color: #333B3E;
  118. color: grey;
  119. padding: 0px 0px 0px 0px;
  120. }
  121.  
  122. .carousel{
  123. width: 100%;
  124. height: 300px;
  125. background-color: #3E555E;
  126. }
  127.  
  128. .fellows{
  129. font-size: 2.4rem;
  130. }
  131.  
  132.  
  133. .button{
  134. text-decoration: none;
  135. color:#fff;
  136. font-size: 20px;
  137. width: 150px;
  138. height: 40px;
  139. display: block;
  140. text-align: center;
  141. margin-top: -15px;
  142. line-height: 40px;
  143. }
  144.  
  145.  
  146. .wanted{
  147. display: flex;
  148. text-align: center;
  149. }
  150.  
  151. .wanted article{
  152. height: 400px;
  153. background-color: #3E555E;
  154. margin-top: 50px;
  155. margin-right: 20px;
  156. flex-grow: 1;
  157. }
  158.  
  159. form{
  160. margin-top: 150px;
  161. border-top: solid 2px #3E555E;
  162. margin-left: 10px;
  163. margin-right: 10px;
  164. display: grid;
  165. padding-bottom: 25px;
  166. }
  167.  
  168. form h2{
  169. text-align: left;
  170. margin-top: 15px;
  171. }
  172.  
  173. form input, form textarea, form select{
  174. margin: 0 auto;
  175. margin-top: 20px;
  176. width: 90%;
  177. }
  178.  
  179. form input, form textarea{
  180. border: solid 2px #3E555E;
  181. }
  182.  
  183. form textarea{
  184. height: 150px;
  185. margin-bottom: 30px;
  186. }
  187.  
  188. form .send-button {
  189. display: flex;
  190. flex-direction: row-reverse;
  191. margin-bottom: 50px;
  192. }
  193.  
  194. form button {
  195. background-color: #aaaaaa;
  196. border: 1px solid #444;
  197. padding: 8px 15px;
  198. border-radius: 5px;
  199. margin: 0;
  200. }
  201.  
  202. footer {
  203. margin-top: auto;
  204. padding: 15px 50px 15px 50px;
  205. display: flex;
  206. }
  207.  
  208. footer a {
  209. margin: 5px;
  210. text-decoration: none;
  211. color: inherit;
  212. color: white;
  213. }
  214.  
  215. footer div {
  216. display: flex;
  217. flex-direction: column;
  218. align-items: flex-start;
  219. justify-content: center;
  220. margin-right: 100px;
  221. }
  222.  
  223. footer div:last-of-type {
  224. font-weight: bold;
  225. margin-left: auto;
  226. }
  227.  
  228. @media only screen and (max-width: 961px) {
  229. footer {
  230. flex-direction: column;
  231. align-items: center;
  232. }
  233.  
  234. footer div {
  235. margin: 0;
  236. align-items: center;
  237. }
  238.  
  239. footer div:last-of-type {
  240. margin: 0;
  241. }
  242.  
  243. form h2 {
  244. text-align: center;
  245. }
  246.  
  247. .wanted {
  248. flex-direction: column;
  249. align-items: center;
  250. }
  251.  
  252. .wanted article {
  253. width: 85%;
  254. height: 200px;
  255. margin-bottom: 10px;
  256. }
  257. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement