Horje Website
CSS Responsive Web Design – Social Media Template – CSS Code

CSS Responsive Web Design – Social Media Template

CSS Responsive Web Design - Social Media Template - CSS Code


 
  1. <!DOCTYPE html>
  2. <html>
  3. <title>W3.CSS Template</title>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
  7. <link rel="stylesheet" href="https://www.w3schools.com/lib/w3-theme-blue-grey.css">
  8. <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Open+Sans'>
  9. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  10. <style>
  11. html, body, h1, h2, h3, h4, h5 {font-family: "Open Sans", sans-serif}
  12. </style>
  13. <body class="w3-theme-l5">
  14. <!-- Navbar -->
  15. <div class="w3-top">
  16. <div class="w3-bar w3-theme-d2 w3-left-align w3-large">
  17. <a class="w3-bar-item w3-button w3-hide-medium w3-hide-large w3-right w3-padding-large w3-hover-white w3-large w3-theme-d2" href="javascript:void(0);" onclick="openNav()"><i class="fa fa-bars"></i></a>
  18. <a href="#" class="w3-bar-item w3-button w3-padding-large w3-theme-d4"><i class="fa fa-home w3-margin-right"></i>Logo</a>
  19. <a href="#" class="w3-bar-item w3-button w3-hide-small w3-padding-large w3-hover-white" title="News"><i class="fa fa-globe"></i></a>
  20. <a href="#" class="w3-bar-item w3-button w3-hide-small w3-padding-large w3-hover-white" title="Account Settings"><i class="fa fa-user"></i></a>
  21. <a href="#" class="w3-bar-item w3-button w3-hide-small w3-padding-large w3-hover-white" title="Messages"><i class="fa fa-envelope"></i></a>
  22. <div class="w3-dropdown-hover w3-hide-small">
  23. <button class="w3-button w3-padding-large" title="Notifications"><i class="fa fa-bell"></i><span class="w3-badge w3-right w3-small w3-green">3</span></button>
  24. <div class="w3-dropdown-content w3-card-4 w3-bar-block" style="width:300px">
  25. <a href="#" class="w3-bar-item w3-button">One new friend request</a>
  26. <a href="#" class="w3-bar-item w3-button">John Doe posted on your wall</a>
  27. <a href="#" class="w3-bar-item w3-button">Jane likes your post</a>
  28. </div>
  29. </div>
  30. <a href="#" class="w3-bar-item w3-button w3-hide-small w3-right w3-padding-large w3-hover-white" title="My Account">
  31. <img src="https://www.w3schools.com//w3images/avatar2.png" class="w3-circle" style="height:23px;width:23px" alt="Avatar">
  32. </a>
  33. </div>
  34. </div>
  35. <!-- Navbar on small screens -->
  36. <div id="navDemo" class="w3-bar-block w3-theme-d2 w3-hide w3-hide-large w3-hide-medium w3-large">
  37. <a href="#" class="w3-bar-item w3-button w3-padding-large">Link 1</a>
  38. <a href="#" class="w3-bar-item w3-button w3-padding-large">Link 2</a>
  39. <a href="#" class="w3-bar-item w3-button w3-padding-large">Link 3</a>
  40. <a href="#" class="w3-bar-item w3-button w3-padding-large">My Profile</a>
  41. </div>
  42. <!-- Page Container -->
  43. <div class="w3-container w3-content" style="max-width:1400px;margin-top:80px">
  44. <!-- The Grid -->
  45. <div class="w3-row">
  46. <!-- Left Column -->
  47. <div class="w3-col m3">
  48. <!-- Profile -->
  49. <div class="w3-card w3-round w3-white">
  50. <div class="w3-container">
  51. <h4 class="w3-center">My Profile</h4>
  52. <p class="w3-center"><img src="https://www.w3schools.com//w3images/avatar3.png" class="w3-circle" style="height:106px;width:106px" alt="Avatar"></p>
  53. <hr>
  54. <p><i class="fa fa-pencil fa-fw w3-margin-right w3-text-theme"></i> Designer, UI</p>
  55. <p><i class="fa fa-home fa-fw w3-margin-right w3-text-theme"></i> London, UK</p>
  56. <p><i class="fa fa-birthday-cake fa-fw w3-margin-right w3-text-theme"></i> April 1, 1988</p>
  57. </div>
  58. </div>
  59. <br>
  60. <!-- Accordion -->
  61. <div class="w3-card w3-round">
  62. <div class="w3-white">
  63. <button onclick="myFunction('Demo1')" class="w3-button w3-block w3-theme-l1 w3-left-align"><i class="fa fa-circle-o-notch fa-fw w3-margin-right"></i> My Groups</button>
  64. <div id="Demo1" class="w3-hide w3-container">
  65. <p>Some text..</p>
  66. </div>
  67. <button onclick="myFunction('Demo2')" class="w3-button w3-block w3-theme-l1 w3-left-align"><i class="fa fa-calendar-check-o fa-fw w3-margin-right"></i> My Events</button>
  68. <div id="Demo2" class="w3-hide w3-container">
  69. <p>Some other text..</p>
  70. </div>
  71. <button onclick="myFunction('Demo3')" class="w3-button w3-block w3-theme-l1 w3-left-align"><i class="fa fa-users fa-fw w3-margin-right"></i> My Photos</button>
  72. <div id="Demo3" class="w3-hide w3-container">
  73. <div class="w3-row-padding">
  74. <br>
  75. <div class="w3-half">
  76. <img src="https://www.w3schools.com//w3images/lights.jpg" style="width:100%" class="w3-margin-bottom">
  77. </div>
  78. <div class="w3-half">
  79. <img src="https://www.w3schools.com//w3images/nature.jpg" style="width:100%" class="w3-margin-bottom">
  80. </div>
  81. <div class="w3-half">
  82. <img src="https://www.w3schools.com//w3images/mountains.jpg" style="width:100%" class="w3-margin-bottom">
  83. </div>
  84. <div class="w3-half">
  85. <img src="https://www.w3schools.com//w3images/forest.jpg" style="width:100%" class="w3-margin-bottom">
  86. </div>
  87. <div class="w3-half">
  88. <img src="https://www.w3schools.com//w3images/nature.jpg" style="width:100%" class="w3-margin-bottom">
  89. </div>
  90. <div class="w3-half">
  91. <img src="https://www.w3schools.com//w3images/snow.jpg" style="width:100%" class="w3-margin-bottom">
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. <br>
  98. <!-- Interests -->
  99. <div class="w3-card w3-round w3-white w3-hide-small">
  100. <div class="w3-container">
  101. <p>Interests</p>
  102. <p>
  103. <span class="w3-tag w3-small w3-theme-d5">News</span>
  104. <span class="w3-tag w3-small w3-theme-d4">W3Schools</span>
  105. <span class="w3-tag w3-small w3-theme-d3">Labels</span>
  106. <span class="w3-tag w3-small w3-theme-d2">Games</span>
  107. <span class="w3-tag w3-small w3-theme-d1">Friends</span>
  108. <span class="w3-tag w3-small w3-theme">Games</span>
  109. <span class="w3-tag w3-small w3-theme-l1">Friends</span>
  110. <span class="w3-tag w3-small w3-theme-l2">Food</span>
  111. <span class="w3-tag w3-small w3-theme-l3">Design</span>
  112. <span class="w3-tag w3-small w3-theme-l4">Art</span>
  113. <span class="w3-tag w3-small w3-theme-l5">Photos</span>
  114. </p>
  115. </div>
  116. </div>
  117. <br>
  118. <!-- Alert Box -->
  119. <div class="w3-container w3-display-container w3-round w3-theme-l4 w3-border w3-theme-border w3-margin-bottom w3-hide-small">
  120. <span onclick="this.parentElement.style.display='none'" class="w3-button w3-theme-l3 w3-display-topright">
  121. <i class="fa fa-remove"></i>
  122. </span>
  123. <p><strong>Hey!</strong></p>
  124. <p>People are looking at your profile. Find out who.</p>
  125. </div>
  126. <!-- End Left Column -->
  127. </div>
  128. <!-- Middle Column -->
  129. <div class="w3-col m7">
  130. <div class="w3-row-padding">
  131. <div class="w3-col m12">
  132. <div class="w3-card w3-round w3-white">
  133. <div class="w3-container w3-padding">
  134. <h6 class="w3-opacity">Social Media template by w3.css</h6>
  135. <p contenteditable="true" class="w3-border w3-padding">Status: Feeling Blue</p>
  136. <button type="button" class="w3-button w3-theme"><i class="fa fa-pencil"></i>  Post</button>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. <div class="w3-container w3-card w3-white w3-round w3-margin"><br>
  142. <img src="https://www.w3schools.com//w3images/avatar2.png" alt="Avatar" class="w3-left w3-circle w3-margin-right" style="width:60px">
  143. <span class="w3-right w3-opacity">1 min</span>
  144. <h4>John Doe</h4><br>
  145. <hr class="w3-clear">
  146. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  147. <div class="w3-row-padding" style="margin:0 -16px">
  148. <div class="w3-half">
  149. <img src="https://www.w3schools.com//w3images/lights.jpg" style="width:100%" alt="Northern Lights" class="w3-margin-bottom">
  150. </div>
  151. <div class="w3-half">
  152. <img src="https://www.w3schools.com//w3images/nature.jpg" style="width:100%" alt="Nature" class="w3-margin-bottom">
  153. </div>
  154. </div>
  155. <button type="button" class="w3-button w3-theme-d1 w3-margin-bottom"><i class="fa fa-thumbs-up"></i>  Like</button>
  156. <button type="button" class="w3-button w3-theme-d2 w3-margin-bottom"><i class="fa fa-comment"></i>  Comment</button>
  157. </div>
  158. <div class="w3-container w3-card w3-white w3-round w3-margin"><br>
  159. <img src="https://www.w3schools.com//w3images/avatar5.png" alt="Avatar" class="w3-left w3-circle w3-margin-right" style="width:60px">
  160. <span class="w3-right w3-opacity">16 min</span>
  161. <h4>Jane Doe</h4><br>
  162. <hr class="w3-clear">
  163. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  164. <button type="button" class="w3-button w3-theme-d1 w3-margin-bottom"><i class="fa fa-thumbs-up"></i>  Like</button>
  165. <button type="button" class="w3-button w3-theme-d2 w3-margin-bottom"><i class="fa fa-comment"></i>  Comment</button>
  166. </div>
  167. <div class="w3-container w3-card w3-white w3-round w3-margin"><br>
  168. <img src="https://www.w3schools.com//w3images/avatar6.png" alt="Avatar" class="w3-left w3-circle w3-margin-right" style="width:60px">
  169. <span class="w3-right w3-opacity">32 min</span>
  170. <h4>Angie Jane</h4><br>
  171. <hr class="w3-clear">
  172. <p>Have you seen this?</p>
  173. <img src="https://www.w3schools.com//w3images/nature.jpg" style="width:100%" class="w3-margin-bottom">
  174. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  175. <button type="button" class="w3-button w3-theme-d1 w3-margin-bottom"><i class="fa fa-thumbs-up"></i>  Like</button>
  176. <button type="button" class="w3-button w3-theme-d2 w3-margin-bottom"><i class="fa fa-comment"></i>  Comment</button>
  177. </div>
  178. <!-- End Middle Column -->
  179. </div>
  180. <!-- Right Column -->
  181. <div class="w3-col m2">
  182. <div class="w3-card w3-round w3-white w3-center">
  183. <div class="w3-container">
  184. <p>Upcoming Events:</p>
  185. <img src="https://www.w3schools.com//w3images/forest.jpg" alt="Forest" style="width:100%;">
  186. <p><strong>Holiday</strong></p>
  187. <p>Friday 15:00</p>
  188. <p><button class="w3-button w3-block w3-theme-l4">Info</button></p>
  189. </div>
  190. </div>
  191. <br>
  192. <div class="w3-card w3-round w3-white w3-center">
  193. <div class="w3-container">
  194. <p>Friend Request</p>
  195. <img src="https://www.w3schools.com//w3images/avatar6.png" alt="Avatar" style="width:50%"><br>
  196. <span>Jane Doe</span>
  197. <div class="w3-row w3-opacity">
  198. <div class="w3-half">
  199. <button class="w3-button w3-block w3-green w3-section" title="Accept"><i class="fa fa-check"></i></button>
  200. </div>
  201. <div class="w3-half">
  202. <button class="w3-button w3-block w3-red w3-section" title="Decline"><i class="fa fa-remove"></i></button>
  203. </div>
  204. </div>
  205. </div>
  206. </div>
  207. <br>
  208. <div class="w3-card w3-round w3-white w3-padding-16 w3-center">
  209. <p>ADS</p>
  210. </div>
  211. <br>
  212. <div class="w3-card w3-round w3-white w3-padding-32 w3-center">
  213. <p><i class="fa fa-bug w3-xxlarge"></i></p>
  214. </div>
  215. <!-- End Right Column -->
  216. </div>
  217. <!-- End Grid -->
  218. </div>
  219. <!-- End Page Container -->
  220. </div>
  221. <br>
  222. <!-- Footer -->
  223. <footer class="w3-container w3-theme-d3 w3-padding-16">
  224. <h5>Footer</h5>
  225. </footer>
  226. <footer class="w3-container w3-theme-d5">
  227. <p>Powered by <a href="https://www.w3schools.com/w3css/default.asp" target="_blank">w3.css</a></p>
  228. </footer>
  229. <script>
  230. // Accordion
  231. function myFunction(id) {
  232. var x = document.getElementById(id);
  233. if (x.className.indexOf("w3-show") == -1) {
  234. x.className += " w3-show";
  235. x.previousElementSibling.className += " w3-theme-d1";
  236. } else {
  237. x.className = x.className.replace("w3-show", "");
  238. x.previousElementSibling.className =
  239. x.previousElementSibling.className.replace(" w3-theme-d1", "");
  240. }
  241. }
  242. // Used to toggle the menu on smaller screens when clicking on the menu button
  243. function openNav() {
  244. var x = document.getElementById("navDemo");
  245. if (x.className.indexOf("w3-show") == -1) {
  246. x.className += " w3-show";
  247. } else {
  248. x.className = x.className.replace(" w3-show", "");
  249. }
  250. }
  251. </script>
  252. </body>
  253. </html>



Try Your Self ->



Published:
July 18, 2020
Author:
admin
Category:
CSS Responsive, CSS Source Code
Views:
17

This article was posted in CSS Responsive, CSS Source Code and tagged , , . Bookmark the permalink. Follow comments with the RSS feed for this post.Post a Comment or leave a trackback: Trackback URL.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Horje © 2011 - 2022