Horje Website
CSS Responsive Web Design – Apartment Rental Template – CSS Code

CSS Responsive Web Design – Apartment Rental Template

CSS Responsive Web Design - Apartment Rental 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://fonts.googleapis.com/css?family=Raleway">
  8. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  9. <style>
  10. body,h1,h2,h3,h4,h5,h6 {font-family: "Raleway", Arial, Helvetica, sans-serif}
  11. .mySlides {display: none}
  12. </style>
  13. <body class="w3-content w3-border-left w3-border-right">
  14. <!-- Sidebar/menu -->
  15. <nav class="w3-sidebar w3-light-grey w3-collapse w3-top" style="z-index:3;width:260px" id="mySidebar">
  16. <div class="w3-container w3-display-container w3-padding-16">
  17. <i onclick="w3_close()" class="fa fa-remove w3-hide-large w3-button w3-transparent w3-display-topright"></i>
  18. <h3>Rental</h3>
  19. <h3>from $99</h3>
  20. <h6>per night</h6>
  21. <hr>
  22. <form action="/action_page.php" target="_blank">
  23. <p><label><i class="fa fa-calendar-check-o"></i> Check In</label></p>
  24. <input class="w3-input w3-border" type="text" placeholder="DD MM YYYY" name="CheckIn" required>
  25. <p><label><i class="fa fa-calendar-o"></i> Check Out</label></p>
  26. <input class="w3-input w3-border" type="text" placeholder="DD MM YYYY" name="CheckOut" required>
  27. <p><label><i class="fa fa-male"></i> Adults</label></p>
  28. <input class="w3-input w3-border" type="number" value="1" name="Adults" min="1" max="6">
  29. <p><label><i class="fa fa-child"></i> Kids</label></p>
  30. <input class="w3-input w3-border" type="number" value="0" name="Kids" min="0" max="6">
  31. <p><button class="w3-button w3-block w3-green w3-left-align" type="submit"><i class="fa fa-search w3-margin-right"></i> Search availability</button></p>
  32. </form>
  33. </div>
  34. <div class="w3-bar-block">
  35. <a href="#apartment" class="w3-bar-item w3-button w3-padding-16"><i class="fa fa-building"></i> Apartment</a>
  36. <a href="javascript:void(0)" class="w3-bar-item w3-button w3-padding-16" onclick="document.getElementById('subscribe').style.display='block'"><i class="fa fa-rss"></i> Subscribe</a>
  37. <a href="#contact" class="w3-bar-item w3-button w3-padding-16"><i class="fa fa-envelope"></i> Contact</a>
  38. </div>
  39. </nav>
  40. <!-- Top menu on small screens -->
  41. <header class="w3-bar w3-top w3-hide-large w3-black w3-xlarge">
  42. <span class="w3-bar-item">Rental</span>
  43. <a href="javascript:void(0)" class="w3-right w3-bar-item w3-button" onclick="w3_open()"><i class="fa fa-bars"></i></a>
  44. </header>
  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. <!-- !PAGE CONTENT! -->
  48. <div class="w3-main w3-white" style="margin-left:260px">
  49. <!-- Push down content on small screens -->
  50. <div class="w3-hide-large" style="margin-top:80px"></div>
  51. <!-- Slideshow Header -->
  52. <div class="w3-container" id="apartment">
  53. <h2 class="w3-text-green">The Apartment</h2>
  54. <div class="w3-display-container mySlides">
  55. <img src="https://www.w3schools.com//w3images/livingroom.jpg" style="width:100%;margin-bottom:-6px">
  56. <div class="w3-display-bottomleft w3-container w3-black">
  57. <p>Living Room</p>
  58. </div>
  59. </div>
  60. <div class="w3-display-container mySlides">
  61. <img src="https://www.w3schools.com//w3images/diningroom.jpg" style="width:100%;margin-bottom:-6px">
  62. <div class="w3-display-bottomleft w3-container w3-black">
  63. <p>Dining Room</p>
  64. </div>
  65. </div>
  66. <div class="w3-display-container mySlides">
  67. <img src="https://www.w3schools.com//w3images/bedroom.jpg" style="width:100%;margin-bottom:-6px">
  68. <div class="w3-display-bottomleft w3-container w3-black">
  69. <p>Bedroom</p>
  70. </div>
  71. </div>
  72. <div class="w3-display-container mySlides">
  73. <img src="https://www.w3schools.com//w3images/livingroom2.jpg" style="width:100%;margin-bottom:-6px">
  74. <div class="w3-display-bottomleft w3-container w3-black">
  75. <p>Living Room II</p>
  76. </div>
  77. </div>
  78. </div>
  79. <div class="w3-row-padding w3-section">
  80. <div class="w3-col s3">
  81. <img class="demo w3-opacity w3-hover-opacity-off" src="https://www.w3schools.com//w3images/livingroom.jpg" style="width:100%;cursor:pointer" onclick="currentDiv(1)" title="Living room">
  82. </div>
  83. <div class="w3-col s3">
  84. <img class="demo w3-opacity w3-hover-opacity-off" src="https://www.w3schools.com//w3images/diningroom.jpg" style="width:100%;cursor:pointer" onclick="currentDiv(2)" title="Dining room">
  85. </div>
  86. <div class="w3-col s3">
  87. <img class="demo w3-opacity w3-hover-opacity-off" src="https://www.w3schools.com//w3images/bedroom.jpg" style="width:100%;cursor:pointer" onclick="currentDiv(3)" title="Bedroom">
  88. </div>
  89. <div class="w3-col s3">
  90. <img class="demo w3-opacity w3-hover-opacity-off" src="https://www.w3schools.com//w3images/livingroom2.jpg" style="width:100%;cursor:pointer" onclick="currentDiv(4)" title="Second Living Room">
  91. </div>
  92. </div>
  93. <div class="w3-container">
  94. <h4><strong>The space</strong></h4>
  95. <div class="w3-row w3-large">
  96. <div class="w3-col s6">
  97. <p><i class="fa fa-fw fa-male"></i> Max people: 4</p>
  98. <p><i class="fa fa-fw fa-bath"></i> Bathrooms: 2</p>
  99. <p><i class="fa fa-fw fa-bed"></i> Bedrooms: 1</p>
  100. </div>
  101. <div class="w3-col s6">
  102. <p><i class="fa fa-fw fa-clock-o"></i> Check In: After 3PM</p>
  103. <p><i class="fa fa-fw fa-clock-o"></i> Check Out: 12PM</p>
  104. </div>
  105. </div>
  106. <hr>
  107. <h4><strong>Amenities</strong></h4>
  108. <div class="w3-row w3-large">
  109. <div class="w3-col s6">
  110. <p><i class="fa fa-fw fa-shower"></i> Shower</p>
  111. <p><i class="fa fa-fw fa-wifi"></i> WiFi</p>
  112. <p><i class="fa fa-fw fa-tv"></i> TV</p>
  113. </div>
  114. <div class="w3-col s6">
  115. <p><i class="fa fa-fw fa-cutlery"></i> Kitchen</p>
  116. <p><i class="fa fa-fw fa-thermometer"></i> Heating</p>
  117. <p><i class="fa fa-fw fa-wheelchair"></i> Accessible</p>
  118. </div>
  119. </div>
  120. <hr>
  121. <h4><strong>Extra Info</strong></h4>
  122. <p>Our apartment is really clean and we like to keep it that way. Enjoy the lorem ipsum dolor sit amet, consectetur adipiscing 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>
  123. <p>We accept: <i class="fa fa-credit-card w3-large"></i> <i class="fa fa-cc-mastercard w3-large"></i> <i class="fa fa-cc-amex w3-large"></i> <i class="fa fa-cc-cc-visa w3-large"></i><i class="fa fa-cc-paypal w3-large"></i></p>
  124. <hr>
  125. <h4><strong>Rules</strong></h4>
  126. <p>Lorem ipsum dolor sit amet, consectetur adipiscing 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>
  127. <p>Subscribe to receive updates on available dates and special offers.</p>
  128. <p><button class="w3-button w3-green w3-third" onclick="document.getElementById('subscribe').style.display='block'">Subscribe</button></p>
  129. </div>
  130. <hr>
  131. <!-- Contact -->
  132. <div class="w3-container" id="contact">
  133. <h2>Contact</h2>
  134. <i class="fa fa-map-marker" style="width:30px"></i> Chicago, US<br>
  135. <i class="fa fa-phone" style="width:30px"></i> Phone: +00 151515<br>
  136. <i class="fa fa-envelope" style="width:30px"> </i> Email: [email protected]<br>
  137. <p>Questions? Go ahead, ask them:</p>
  138. <form action="/action_page.php" target="_blank">
  139. <p><input class="w3-input w3-border" type="text" placeholder="Name" required name="Name"></p>
  140. <p><input class="w3-input w3-border" type="text" placeholder="Email" required name="Email"></p>
  141. <p><input class="w3-input w3-border" type="text" placeholder="Message" required name="Message"></p>
  142. <button type="submit" class="w3-button w3-green w3-third">Send a Message</button>
  143. </form>
  144. </div>
  145. <footer class="w3-container w3-padding-16" style="margin-top:32px">Powered by <a href="https://www.w3schools.com/w3css/default.asp" title="W3.CSS" target="_blank" class="w3-hover-text-green">w3.css</a></footer>
  146. <!-- End page content -->
  147. </div>
  148. <!-- Subscribe Modal -->
  149. <div id="subscribe" class="w3-modal">
  150. <div class="w3-modal-content w3-animate-zoom w3-padding-large">
  151. <div class="w3-container w3-white w3-center">
  152. <i onclick="document.getElementById('subscribe').style.display='none'" class="fa fa-remove w3-button w3-xlarge w3-right w3-transparent"></i>
  153. <h2 class="w3-wide">SUBSCRIBE</h2>
  154. <p>Join our mailing list to receive updates on available dates and special offers.</p>
  155. <p><input class="w3-input w3-border" type="text" placeholder="Enter e-mail"></p>
  156. <button type="button" class="w3-button w3-padding-large w3-green w3-margin-bottom" onclick="document.getElementById('subscribe').style.display='none'">Subscribe</button>
  157. </div>
  158. </div>
  159. </div>
  160. <script>
  161. // Script to open and close sidebar when on tablets and phones
  162. function w3_open() {
  163. document.getElementById("mySidebar").style.display = "block";
  164. document.getElementById("myOverlay").style.display = "block";
  165. }
  166. function w3_close() {
  167. document.getElementById("mySidebar").style.display = "none";
  168. document.getElementById("myOverlay").style.display = "none";
  169. }
  170. // Slideshow Apartment Images
  171. var slideIndex = 1;
  172. showDivs(slideIndex);
  173. function plusDivs(n) {
  174. showDivs(slideIndex += n);
  175. }
  176. function currentDiv(n) {
  177. showDivs(slideIndex = n);
  178. }
  179. function showDivs(n) {
  180. var i;
  181. var x = document.getElementsByClassName("mySlides");
  182. var dots = document.getElementsByClassName("demo");
  183. if (n > x.length) {slideIndex = 1}
  184. if (n < 1) {slideIndex = x.length}
  185. for (i = 0; i < x.length; i++) {
  186. x[i].style.display = "none";
  187. }
  188. for (i = 0; i < dots.length; i++) {
  189. dots[i].className = dots[i].className.replace(" w3-opacity-off", "");
  190. }
  191. x[slideIndex-1].style.display = "block";
  192. dots[slideIndex-1].className += " w3-opacity-off";
  193. }
  194. </script>
  195. </body>
  196. </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