Horje Website
CSS Responsive Web Design – Templates – Web Page Template – CSS Code

CSS Responsive Web Design – Templates – Web Page Template

CSS Responsive Web Design - Templates - Web Page Template - CSS Code


 
  1. <!DOCTYPE html>
  2. <html lang="en">
  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-black.css">
  8. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
  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,h6 {font-family: "Roboto", sans-serif;}
  12. .w3-sidebar {
  13. z-index: 3;
  14. width: 250px;
  15. top: 43px;
  16. bottom: 0;
  17. height: inherit;
  18. }
  19. </style>
  20. <body>
  21. <!-- Navbar -->
  22. <div class="w3-top">
  23. <div class="w3-bar w3-theme w3-top w3-left-align w3-large">
  24. <a class="w3-bar-item w3-button w3-right w3-hide-large w3-hover-white w3-large w3-theme-l1" href="javascript:void(0)" onclick="w3_open()"><i class="fa fa-bars"></i></a>
  25. <a href="#" class="w3-bar-item w3-button w3-theme-l1">Logo</a>
  26. <a href="#" class="w3-bar-item w3-button w3-hide-small w3-hover-white">About</a>
  27. <a href="#" class="w3-bar-item w3-button w3-hide-small w3-hover-white">Values</a>
  28. <a href="#" class="w3-bar-item w3-button w3-hide-small w3-hover-white">News</a>
  29. <a href="#" class="w3-bar-item w3-button w3-hide-small w3-hover-white">Contact</a>
  30. <a href="#" class="w3-bar-item w3-button w3-hide-small w3-hide-medium w3-hover-white">Clients</a>
  31. <a href="#" class="w3-bar-item w3-button w3-hide-small w3-hide-medium w3-hover-white">Partners</a>
  32. </div>
  33. </div>
  34. <!-- Sidebar -->
  35. <nav class="w3-sidebar w3-bar-block w3-collapse w3-large w3-theme-l5 w3-animate-left" id="mySidebar">
  36. <a href="javascript:void(0)" onclick="w3_close()" class="w3-right w3-xlarge w3-padding-large w3-hover-black w3-hide-large" title="Close Menu">
  37. <i class="fa fa-remove"></i>
  38. </a>
  39. <h4 class="w3-bar-item"><b>Menu</b></h4>
  40. <a class="w3-bar-item w3-button w3-hover-black" href="#">Link</a>
  41. <a class="w3-bar-item w3-button w3-hover-black" href="#">Link</a>
  42. <a class="w3-bar-item w3-button w3-hover-black" href="#">Link</a>
  43. <a class="w3-bar-item w3-button w3-hover-black" href="#">Link</a>
  44. </nav>
  45. <!-- Overlay effect when opening sidebar on small screens -->
  46. <div class="w3-overlay w3-hide-large" onclick="w3_close()" style="cursor:pointer" title="close side menu" id="myOverlay"></div>
  47. <!-- Main content: shift it to the right by 250 pixels when the sidebar is visible -->
  48. <div class="w3-main" style="margin-left:250px">
  49. <div class="w3-row w3-padding-64">
  50. <div class="w3-twothird w3-container">
  51. <h1 class="w3-text-teal">Heading</h1>
  52. <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. Lorem ipsum
  53. 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>
  54. </div>
  55. <div class="w3-third w3-container">
  56. <p class="w3-border w3-padding-large w3-padding-32 w3-center">AD</p>
  57. <p class="w3-border w3-padding-large w3-padding-64 w3-center">AD</p>
  58. </div>
  59. </div>
  60. <div class="w3-row">
  61. <div class="w3-twothird w3-container">
  62. <h1 class="w3-text-teal">Heading</h1>
  63. <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. Lorem ipsum
  64. 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>
  65. </div>
  66. <div class="w3-third w3-container">
  67. <p class="w3-border w3-padding-large w3-padding-32 w3-center">AD</p>
  68. <p class="w3-border w3-padding-large w3-padding-64 w3-center">AD</p>
  69. </div>
  70. </div>
  71. <div class="w3-row w3-padding-64">
  72. <div class="w3-twothird w3-container">
  73. <h1 class="w3-text-teal">Heading</h1>
  74. <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. Lorem ipsum
  75. 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>
  76. </div>
  77. <div class="w3-third w3-container">
  78. <p class="w3-border w3-padding-large w3-padding-32 w3-center">AD</p>
  79. <p class="w3-border w3-padding-large w3-padding-64 w3-center">AD</p>
  80. </div>
  81. </div>
  82. <!-- Pagination -->
  83. <div class="w3-center w3-padding-32">
  84. <div class="w3-bar">
  85. <a class="w3-button w3-black" href="#">1</a>
  86. <a class="w3-button w3-hover-black" href="#">2</a>
  87. <a class="w3-button w3-hover-black" href="#">3</a>
  88. <a class="w3-button w3-hover-black" href="#">4</a>
  89. <a class="w3-button w3-hover-black" href="#">5</a>
  90. <a class="w3-button w3-hover-black" href="#">ยป</a>
  91. </div>
  92. </div>
  93. <footer id="myFooter">
  94. <div class="w3-container w3-theme-l2 w3-padding-32">
  95. <h4>Footer</h4>
  96. </div>
  97. <div class="w3-container w3-theme-l1">
  98. <p>Powered by <a href="https://www.w3schools.com/w3css/default.asp" target="_blank">w3.css</a></p>
  99. </div>
  100. </footer>
  101. <!-- END MAIN -->
  102. </div>
  103. <script>
  104. // Get the Sidebar
  105. var mySidebar = document.getElementById("mySidebar");
  106. // Get the DIV with overlay effect
  107. var overlayBg = document.getElementById("myOverlay");
  108. // Toggle between showing and hiding the sidebar, and add overlay effect
  109. function w3_open() {
  110. if (mySidebar.style.display === 'block') {
  111. mySidebar.style.display = 'none';
  112. overlayBg.style.display = "none";
  113. } else {
  114. mySidebar.style.display = 'block';
  115. overlayBg.style.display = "block";
  116. }
  117. }
  118. // Close the sidebar with the close button
  119. function w3_close() {
  120. mySidebar.style.display = "none";
  121. overlayBg.style.display = "none";
  122. }
  123. </script>
  124. </body>
  125. </html>



Try Your Self ->



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

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 - 2023