Advertisement
0reldev

WCS Quest "08 - CSS : Flexbox"

Mar 5th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.13 KB | None | 0 0
  1. ***********************HTML
  2.  
  3. <!DOCTYPE html>
  4. <html lang="en">
  5. <head>
  6. <meta charset="UTF-8">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <title>Find the precious!</title>
  9. <link rel="stylesheet" href="style.css">
  10. </head>
  11. <body>
  12. <nav>
  13. <ul>
  14. <li>FindThePrecious.com</li>
  15. <li>Fellows</li>
  16. <li>Contact us</li>
  17. </ul>
  18. </nav>
  19. <section id="first_pic">
  20. </section>
  21. <section>
  22. <div class="carousel"></div>
  23. </section>
  24. <section id="fellows">
  25. <h2>Fellows wanted dead <a>(or alive if you want to eat them later)</a></h2>
  26. </section>
  27. <section class="articles">
  28. <div>
  29. <article></article>
  30. <article></article>
  31. <article></article>
  32. </div>
  33. </section>
  34. <hr>
  35. <form id="contact">
  36. <h2>Contact us</h2>
  37. <ul>
  38. <li><input type="email" placeholder="@"></li>
  39. <li><input type="text" placeholder="&#8962;"></li>
  40.  
  41. <li><label for="select-option"></label>
  42. <select name="options" id="select-option">
  43. <option value="option1">I have seen one of them</option>
  44. <option value="option2">Option 2</option>
  45. <option value="option3">Option 3</option>
  46. </select></li>
  47.  
  48. <li><textarea placeholder="Your message" rows="6" cols="130"></textarea></li>
  49. </ul>
  50. <div class="button" >
  51. <button type="submit" form="contact" value="Submit">Send!</button>
  52. </div>
  53. <div class="clear"> </div>
  54. </form>
  55. <footer>
  56. <div id="footer-content"> <!-- Footer content -->
  57. <div id="col1">
  58. <div>About us</div>
  59. <div>Fellows</div>
  60. <div>Join our army</div>
  61. </div>
  62. <div id="col2">
  63. <div>FAQ</div>
  64. <div>Reward conditions</div>
  65. <div>Legal mentions</div>
  66. </div>
  67. </div>
  68.  
  69. <div id="external-links"> <!-- External links -->
  70. <div>Sauron4Ever.com</div>
  71. <div>Follow him also on Twitter</div>
  72. </div>
  73.  
  74. </footer>
  75.  
  76.  
  77. </body>
  78. </html>
  79.  
  80.  
  81.  
  82.  
  83.  
  84. ***********************CSS
  85.  
  86.  
  87. * {
  88. margin: 5px;
  89. padding: 0;
  90. }
  91.  
  92. /* NAVIGATION FORMATTING */
  93. nav {
  94. background-color: black ;
  95. color: grey ;
  96. margin-bottom: 0px;
  97. padding: 0px;
  98. }
  99. nav ul {
  100. display: flex;
  101. flex-direction: row;
  102. justify-content: left;
  103. }
  104.  
  105. nav ul li {
  106. display: flex ;
  107. font-size: 1em ;
  108. padding: .4em ;
  109. list-style: none;
  110. align-items: center;
  111. }
  112. nav li:first-child {
  113. font-size: 2em ;
  114. font-weight: bold;
  115. }
  116. nav li:nth-child(2) {
  117. background-color: #C8C8C8 ;
  118. }
  119. #first_pic {
  120. background-color: #E6E6E6 ;
  121. margin-top: 0px ;
  122. }
  123.  
  124.  
  125. /* ARTICLES FORMATTING */
  126. h2>a { /* text between parenthesis */
  127. display: inline;
  128. font-size: smaller;
  129. font-weight: normal;
  130. }
  131. h2 {
  132. font-size: 30px;
  133. }
  134. #fellows {
  135. text-align: center;
  136. }
  137. .articles {
  138. /* padding: 10px; */
  139. text-align: center;
  140. color: #E6E6E6 ;
  141. margin-bottom: 5em;
  142. }
  143.  
  144. section div {
  145. display: flex;
  146. justify-content: space-between;
  147. width: 99%;
  148.  
  149. }
  150.  
  151. article {
  152. display: flex;
  153. background-color: #E6E6E6 ;
  154. /* padding: 15px ; */
  155. /* margin: 5px ; */
  156. width: 25em;
  157. height: 30em;
  158. }
  159.  
  160. /* FORM FORMATTING */
  161. form ul {
  162. list-style-type: none;
  163. text-align: center;
  164. }
  165. form ul li {
  166. padding: 5px;
  167. }
  168. input {
  169. size: 200px;
  170. width: 85%;
  171. }
  172. select {
  173. width: 85%;
  174. }
  175. textarea {
  176. width: 85% ;
  177. }
  178. .button {
  179. float: right;
  180. margin-right: 8%;
  181. }
  182.  
  183. .clear {
  184. clear: both;
  185. }
  186.  
  187. /* FOOTER FORMATTING*/
  188. footer {
  189. margin: 0;
  190. background-color: #4A4F4E;
  191. color: #BDC9C7;
  192. padding-top: 1em;
  193. padding-bottom: 1em;
  194. padding-left: 2em;
  195. padding-right : 4em;
  196. display: flex;
  197. justify-content: space-between;
  198.  
  199. }
  200.  
  201. #footer-content {
  202. display: flex;
  203.  
  204. }
  205.  
  206. #footer-content div {
  207. display: flex;
  208. flex-direction: column;
  209. }
  210.  
  211. #external-links {
  212. display: flex;
  213. flex-direction: column;
  214. font-weight: bold;
  215. justify-content: center;
  216. }
  217.  
  218.  
  219.  
  220. footer div div {
  221. margin: .4em;
  222. }
  223.  
  224. /* DESKTOP STYLES */
  225. @media only screen and (min-width: 961px) {
  226.  
  227. #first_pic {
  228. height: 300px;
  229. }
  230. } /*END DESKTOP STYLES*/
  231.  
  232.  
  233.  
  234.  
  235. /* MOBILE STYLES */
  236. @media only screen and (max-width: 961px) {
  237.  
  238. #first_pic {
  239. height: 150px;
  240. width: 99%;
  241. margin-top: 0px ;
  242. }
  243. .articles {
  244. display: flex ;
  245. flex-direction: column;
  246. }
  247.  
  248. article {
  249. display: flex ;
  250. flex-direction: column;
  251. margin-bottom: .4em;
  252. height: 5em;
  253. width: 99%
  254. }
  255.  
  256. section ul {
  257. display: flex;
  258. flex-direction: column;
  259. }
  260.  
  261. .carousel {
  262. display: flex ;
  263. width:99%;
  264. }
  265. form h2 { /* Contact us" title centering. */
  266. text-align: center ;
  267. }
  268.  
  269.  
  270.  
  271. #footer-content {
  272. display: flex;
  273. flex-direction: column;
  274. align-content: center;
  275. }
  276.  
  277. #external-links {
  278. font-weight: normal;
  279. }
  280.  
  281. footer {
  282. display: flex;
  283. flex-direction: column;
  284. align-content: center;
  285. }
  286.  
  287. footer div {
  288. margin: 0px;
  289. padding-top: 0px;
  290. padding-bottom: 0px;
  291. align-items: center;
  292. color: white;
  293. text-size: smaller;
  294. }
  295.  
  296. h2 {
  297. font-size: 15px;
  298. }
  299. h2>p { /* text between parenthesis */
  300. display: inline;
  301. font-size: smaller;
  302. font-weight: normal;
  303. }
  304. nav {
  305. background-color: black ;
  306. color: white ;
  307. }
  308.  
  309. nav li:first-child {
  310. font-size: 1em ;
  311. font-weight: bold;
  312. }
  313. nav ul li {
  314. display: flex ;
  315. font-size: .5em ;
  316. padding: .4em ;
  317. list-style: none;
  318. align-items: center;
  319. }
  320.  
  321. nav li:nth-child(2) {
  322. background-color: black ;
  323. }
  324.  
  325.  
  326. } /* END MOBILE STYLE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement