Advertisement
Mhyrn

findThePrecious.com (CSS Flexbox)

Mar 5th, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.90 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.     <head>
  4.         <meta charset="UTF-8">
  5.         <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.         <title>Find the precious!</title>
  7.         <link rel="stylesheet" href="style.css">
  8.     </head>
  9.     <body>
  10.         <nav>
  11.             <ul>
  12.                 <li>FindThePrecious.com</li>
  13.                 <li>Fellows</li>
  14.                 <li>Contact us</li>
  15.             </ul>
  16.         </nav>
  17.         <section>
  18.             <div class="carousel"></div>
  19.         </section>
  20.         <section>
  21.             <h2>Fellows wanted dead (or alive if you want to eat them later)</h2>
  22.         </section>
  23.         <section>
  24.           <article><img src="https://via.placeholder.com/350x450" alt="placeholder"></article>
  25.           <article><img src="https://via.placeholder.com/350x450" alt="placeholder"></article>
  26.           <article><img src="https://via.placeholder.com/350x450" alt="placeholder"></article>
  27.         </section>
  28.         <form>
  29.             <h2>Contact us</h2>
  30.             <input type="email" placeholder="@">
  31.             <input type="text" placeholder="&#8962;">
  32.             <input type="text" placeholder="I have seen one of them">
  33.             <textarea placeholder="Your message"></textarea>
  34.             <!-- Bouton de soumission -->
  35.             <button type="submit" name="submit">Send !</button>
  36.             <!-- Bouton de soumission -->
  37.         </form>
  38.         <!-- Footer -->
  39.         <footer>
  40.        
  41.             <!-- Liens de bas de page -->
  42.             <nav>
  43.                 <ul>
  44.                     <li>About us</li>
  45.                     <li>Fellows</li>
  46.                     <li>Join our army</li>
  47.                     <li>FAQ</li>
  48.                     <li>Reward conditions</li>
  49.                     <li>Legal mentions</li>
  50.                     <li>Sauron4ever.com</li>
  51.                     <li>Follow him</li>
  52.                 </ul>                  
  53.             </nav>
  54.             <!-- Liens de bas de page -->
  55.            
  56.         </footer>
  57.         <!-- Footer -->
  58.     </body>
  59. </html>
  60.  
  61. /****************************** CSS
  62.  
  63. /* Overhaul */
  64.  
  65. /** Barre de Navigation **/
  66. nav{
  67.   margin:0;
  68.   padding:0;
  69.   background:black;
  70.   height:50px;
  71. }
  72. nav ul li{
  73.   margin:0;
  74.   line-height:50px;
  75.   display:inline;
  76.   padding-right:20px;
  77.   color:white;
  78. }
  79. /** Barre de Navigation **/
  80.  
  81.  
  82. /** Section "Fellows wanted dead" **/
  83. section{
  84.   color:grey;
  85.   text-align:center;
  86. }
  87. section h2{
  88.   margin-top:50px;
  89.   margin-bottom:50px;
  90. }
  91.  
  92. /** Section "Fellows wanted dead" **/
  93.  
  94. /** Formulaire de Contact **/
  95. form{
  96.     display:flex;
  97.     flex-direction:column;
  98.   margin-top:100px;
  99.   border-top: 3px solid grey;
  100. }
  101. input{
  102.   display:block;
  103.   margin-left:auto;
  104.   margin-right:auto;
  105.   font-size:1.8em;
  106.   height:30px;
  107.   margin-top:20px;
  108.   width:80%;
  109. }
  110. textarea{
  111.   display:block;
  112.   margin-left:auto;
  113.   margin-right:auto;
  114.   margin-top:20px;
  115.   height:150px;
  116.   width:80%;
  117. }
  118. button{
  119.     display:block;
  120.     margin-left:80%;
  121.     margin-top:20px;
  122.     height:30px;
  123.     width:10%;
  124. }
  125.    
  126. /** Formulaire de Contact **/
  127.  
  128. /** Footer **/
  129. footer{
  130.     background:black;
  131.     height:80px;   
  132. }
  133. footer nav ul{
  134.     display:flex;
  135.     flex-direction:row;
  136.     flex-wrap: wrap;
  137.     padding-left:5px;
  138.     padding-right:5px;
  139. }
  140. footer nav ul li{
  141.     color:white;
  142. }
  143. /** Footer **/
  144.  
  145. /* Overhaul */
  146.  
  147. /* Desktop */
  148.     form h2{
  149.       color:grey;
  150.       margin-bottom:50px;
  151.     }
  152.     .carousel{
  153.       margin:0;
  154.       height:250px;
  155.       background:grey;
  156.     }
  157.     section article{
  158.       margin:0;
  159.       display:inline;
  160.       padding-right:5px;
  161.       padding-left:5px;
  162.       margin-bottom:100px;
  163.       display:inline;
  164.     }
  165.     article img{
  166.       margin:0;
  167.       width:30%;
  168.     }
  169. /* Desktop */
  170.  
  171. /* Mobile */
  172. @media only screen and (max-width:961px){
  173.     section article{
  174.         display:flex;
  175.         flex-direction:column;
  176.         margin-bottom:20px;
  177.     }
  178.     article img{
  179.         height:150px;
  180.         margin-left:5%;
  181.         margin-right:5%;
  182.         width:90%;
  183.     }
  184.     form{
  185.         margin-top:0;
  186.     }
  187.     form h2{
  188.         text-align:center;
  189.     }
  190.     footer{
  191.         height:400px;
  192.     }
  193.     footer nav ul{
  194.         display:flex;
  195.         flex-direction:column;
  196.         align-items:center;
  197.         justify-content:center;
  198.     }
  199.     footer nav ul li{
  200.     color:white;
  201.     margin:0;
  202.     padding:0;
  203.     }
  204. }
  205. /* Mobile */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement