Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.06 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <title>W3.CSS</title>
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
  6. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  7. <style>
  8. * {box-sizing: border-box;}
  9.  
  10. body {
  11.   margin: 0;
  12.   font-family: Arial, Helvetica, sans-serif;
  13. }
  14.  
  15. .topnav {
  16.   overflow: hidden;
  17.   background-color: #e9e9e9;
  18. }
  19.  
  20. .topnav a {
  21.   float: left;
  22.   display: block;
  23.   color: black;
  24.   text-align: center;
  25.   padding: 14px 16px;
  26.   text-decoration: none;
  27.   font-size: 17px;
  28. }
  29.  
  30. .topnav a:hover {
  31.   background-color: #ddd;
  32.   color: black;
  33. }
  34.  
  35. .topnav a.active {
  36.   background-color: #2196F3;
  37.   color: white;
  38. }
  39.  
  40. .topnav .search-container {
  41.   float: right;
  42. }
  43.  
  44. .topnav input[type=text] {
  45.   padding: 6px;
  46.   margin-top: 8px;
  47.   font-size: 17px;
  48.   border: none;
  49. }
  50.  
  51. .topnav .search-container button {
  52.   float: right;
  53.   padding: 6px 10px;
  54.   margin-top: 8px;
  55.   margin-right: 16px;
  56.   background: #ddd;
  57.   font-size: 17px;
  58.   border: none;
  59.   cursor: pointer;
  60. }
  61.  
  62. .topnav .search-container button:hover {
  63.   background: #ccc;
  64. }
  65.  
  66. @media screen and (max-width: 600px) {
  67.   .topnav .search-container {
  68.     float: none;
  69.   }
  70.   .topnav a, .topnav input[type=text], .topnav .search-container button {
  71.     float: none;
  72.     display: block;
  73.     text-align: left;
  74.     width: 100%;
  75.     margin: 0;
  76.     padding: 14px;
  77.   }
  78.   .topnav input[type=text] {
  79.     border: 1px solid #ccc;  
  80.   }
  81. }
  82. </style>
  83.  
  84.  
  85.  
  86. <body>
  87.  
  88.  
  89. <div class="w3-container">
  90.  
  91.     <div class="w3-sidebar w3-bar-block w3-collapse w3-card w3-animate-left" id="mySidebar" style="width: 10%">
  92.  
  93.          <div class="search-container">
  94.              <form action="/action_page.php">
  95.                <div class="w3-row">
  96.                  <input class="w3-col" type="text" placeholder="Search.." name="search" style="width:85%;">
  97.                  <button class="w3-col" type="submit" style="width:15%;"><i class="fa fa-search"></i></button>         
  98.                </div>  
  99.              </form>
  100.         </div>
  101.  
  102.         <button onclick="myFunction('Demo1')" class="w3-btn w3-block w3-black w3-left-align">Open Section 1</button>
  103.         <div id="Demo1" class="w3-container w3-hide">
  104.           <h4>Section 1</h4>
  105.           <p>Some text..</p>
  106.         </div>
  107.         <button onclick="myFunction('Demo2')" class="w3-btn w3-block w3-black w3-left-align">Open Section 2</button>
  108.         <div id="Demo2" class="w3-container w3-hide">
  109.           <h4>Section 1</h4>
  110.           <p>Some text..</p>
  111.         </div>
  112.     </div> 
  113.    
  114.     <div class="w3-center" style="margin-left: 10%;">
  115.  
  116.       <div class="w3-center" style="padding-left: 10%; padding-right: 10%;">
  117.         <header class="w3-container w3-blue">
  118.           <h3>Amazon</h3>
  119.         </header>
  120.  
  121.         <br>
  122.  
  123.         <div style="padding-left: 10%;padding-right: 10%;">
  124.           <div class="w3-card-4">
  125.             <header class="w3-container w3-light-grey">
  126.               <h3>John Doe</h3>
  127.             </header>
  128.             <div class="w3-container">
  129.               <br>
  130.               <img src="img_avatar3.png" alt="Avatar" class="w3-left w3-circle w3-margin-right" style="width:60px">
  131.               <p>CEO at Mighty Schools. Marketing and Advertising. Seeking a new job and new opportunities.</p><br>
  132.             </div>
  133.             <div class="w3-row">
  134.               <button class="w3-button w3-block w3-blue w3-col" style="width:50%;">View Profile</button>
  135.               <button class="w3-button w3-block w3-green w3-col" style="width:50%;">Refer Me</button>  
  136.             </div>  
  137.           </div>
  138.         </div>  
  139.  
  140.         <br>
  141.  
  142.         <div style="padding-left: 10%;padding-right: 10%;">
  143.           <div class="w3-card-4">
  144.             <header class="w3-container w3-light-grey">
  145.               <h3>John Doe</h3>
  146.             </header>
  147.             <div class="w3-container">
  148.               <br>
  149.               <img src="img_avatar3.png" alt="Avatar" class="w3-left w3-circle w3-margin-right" style="width:60px">
  150.               <p>CEO at Mighty Schools. Marketing and Advertising. Seeking a new job and new opportunities.</p><br>
  151.             </div>
  152.             <div class="w3-row">
  153.               <button class="w3-button w3-block w3-blue w3-col" style="width:50%;">View Profile</button>
  154.               <button class="w3-button w3-block w3-green w3-col" style="width:50%;">Refer Me</button>  
  155.             </div>  
  156.           </div>
  157.         </div>
  158.       </div>
  159.  
  160.       <br><br>
  161.  
  162.       <button class="w3-button w3-blue" onclick="expand()">Expand</button>
  163.  
  164.  
  165.     </div>
  166. </div>
  167.  
  168.  
  169. <script>
  170. function w3_open() {
  171.   document.getElementById("mySidebar").style.display = "block";
  172. }
  173.  
  174. function w3_close() {
  175.   document.getElementById("mySidebar").style.display = "none";
  176. }
  177.  
  178. function myFunction(id) {
  179.   var x = document.getElementById(id);
  180.   if (x.className.indexOf("w3-show") == -1) {
  181.     x.className += " w3-show";
  182.   } else {
  183.     x.className = x.className.replace(" w3-show", "");
  184.   }
  185. }
  186. </script>
  187.      
  188. </body>
  189. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement