Guest User

Untitled

a guest
Jan 16th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.36 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. * {
  6. box-sizing: border-box;
  7. }
  8. body {
  9. font-family: Arial;
  10. padding: 20px;
  11. background: #f1f1f1;
  12. }
  13. .header {
  14. padding: 30px;
  15. font-size: 40px;
  16. text-align: center;
  17. background: white;
  18. }
  19. .post-wrapper {
  20. float: left;
  21. width: 75%;
  22. }
  23. .sidebar {
  24. float: left;
  25. width: 25%;
  26. padding-left: 20px;
  27. }
  28. .fakeimg {
  29. background-color: #2196f3;
  30. width: 100%;
  31. padding: 20px;
  32. }
  33. .card {
  34. background-color: white;
  35. padding: 20px;
  36. margin-top: 20px;
  37. }
  38. .row:after {
  39. content: "";
  40. display: table;
  41. clear: both;
  42. }
  43. .footer {
  44. padding: 20px;
  45. text-align: center;
  46. background: #ff5722;
  47. margin-top: 20px;
  48. }
  49. /* Add a black background color to the top navigation */
  50. .topnav {
  51. background-color: #2196f3;
  52. overflow: hidden;
  53. }
  54. /* Style the links inside the navigation bar */
  55. .topnav a {
  56. float: left;
  57. display: block;
  58. color: #f2f2f2;
  59. text-align: center;
  60. padding: 14px 16px;
  61. text-decoration: none;
  62. font-size: 17px;
  63. }
  64. /* Change the color of links on hover */
  65. .topnav a:hover {
  66. background-color: #ddd;
  67. color: black;
  68. }
  69. /* Add an active class to highlight the current page */
  70. .active {
  71. background-color: #ef424f;
  72. color: white;
  73. }
  74. /* Hide the link that should open and close the topnav on small screens */
  75. .topnav .icon {
  76. display: none;
  77. }
  78. @media (max-width: 800px) {
  79. .post-wrapper, .sidebar {
  80. width: 100%;
  81. padding: 0;
  82. }
  83. }
  84. /* When the screen is less than 600 pixels wide, hide all links, except for the first one ("Home"). Show the link that contains should open and close the topnav (.icon) */
  85. @media screen and (max-width: 600px) {
  86. .topnav a:not(:first-child) {display: none;}
  87. .topnav a.icon {
  88. float: right;
  89. display: block;
  90. }
  91. }
  92. /* The "responsive" class is added to the topnav with JavaScript when the user clicks on the icon. This class makes the topnav look good on small screens (display the links vertically instead of horizontally) */
  93. @media screen and (max-width: 600px) {
  94. .topnav.responsive {position: relative;}
  95. .topnav.responsive a.icon {
  96. position: absolute;
  97. right: 0;
  98. top: 0;
  99. }
  100. .topnav.responsive a {
  101. float: none;
  102. display: block;
  103. text-align: left;
  104. }
  105. }
  106. </style>
  107. <script type="text/javascript">
  108. /* Toggle between adding and removing the "responsive" class to topnav when the user clicks on the icon */
  109. function myFunction() {
  110. var x = document.getElementById("myTopnav");
  111. if (x.className === "topnav") {
  112. x.className += " responsive";
  113. } else {
  114. x.className = "topnav";
  115. }
  116. }
  117. </script>
  118. </head>
  119. <body>
  120. <div class="header">
  121. <h2>Blog Name</h2>
  122. </div>
  123. <div class="topnav" id="myTopnav">
  124. <a href="#home" class="active">Home</a>
  125. <a href="#news">News</a>
  126. <a href="#contact">Contact</a>
  127. <a href="#about">About</a>
  128. <a href="javascript:void(0);" class="icon" onclick="myFunction()">&#9776;</a>
  129. </div>
  130. <div class="row">
  131. <div class="post-wrapper">
  132. <div class="card">
  133. <h2>How to Design Blog Home Page</h2>
  134. <h5>Title description, Dec 7, 2017</h5>
  135. <div class="fakeimg" style="height:200px;">Image</div>
  136. <p>Lorem ipsum..</p>
  137. <p>Lorem ipsum dolor sit amet, per consul alterum suscipiantur ne, usu cu possit labitur, graece repudiandae ne quo. Cum atequidem evertitur. Sumo mucius ex has, ea soluta offendit nominati usu. Id usu vivendo adipisci, at quot affert adipiscingmei.</p>
  138. </div>
  139. <div class="card">
  140. <h2>How to Design Blog Article Page</h2>
  141. <h5>Title description, Sep 2, 2017</h5>
  142. <div class="fakeimg" style="height:200px;">Image</div>
  143. <p>Lorem ipsum..</p>
  144. <p>Lorem ipsum dolor sit amet, per consul alterum suscipiantur ne, usu cu possit labitur, graece repudiandae ne quo. Cum atequidem evertitur. Sumo mucius ex has, ea soluta offendit nominati usu. Id usu vivendo adipisci, at quot affert adipiscingmei.</p>
  145. </div>
  146. <div class="card">
  147. <h2>How to Design Blog Home Page</h2>
  148. <h5>Title description, Dec 7, 2017</h5>
  149. <div class="fakeimg" style="height:200px;">Image</div>
  150. <p>Lorem ipsum..</p>
  151. <p>Lorem ipsum dolor sit amet, per consul alterum suscipiantur ne, usu cu possit labitur, graece repudiandae ne quo. Cum atequidem evertitur. Sumo mucius ex has, ea soluta offendit nominati usu. Id usu vivendo adipisci, at quot affert adipiscingmei.</p>
  152. </div>
  153. </div>
  154. <div class="sidebar">
  155. <div class="card">
  156. <h2>About Me</h2>
  157. <div class="fakeimg" style="height:100px;">Image</div>
  158. <p>Lorem ipsum dolor sit amet, per consul alterum suscipiantur ne,..</p>
  159. </div>
  160. <div class="card">
  161. <h3>Popular Post</h3>
  162. <div class="fakeimg">Image</div>
  163. <br>
  164. <div class="fakeimg">Image</div>
  165. <br>
  166. <div class="fakeimg">Image</div>
  167. </div>
  168. <div class="card">
  169. <h3>Recent Post</h3>
  170. <div class="fakeimg">Image</div>
  171. <br>
  172. <div class="fakeimg">Image</div>
  173. <br>
  174. <div class="fakeimg">Image</div>
  175. </div>
  176. <div class="card">
  177. <h3>Follow Me</h3>
  178. <p>Lorem ipsum..</p>
  179. </div>
  180. </div>
  181. </div>
  182. <div class="footer">
  183. <h2>Footer</h2>
  184. </div>
  185. </body>
  186. </html>
Add Comment
Please, Sign In to add comment