Horje Website
CSS Responsive Web Design – Mail Template – CSS Code

CSS Responsive Web Design – Mail Template

CSS Responsive Web Design - Mail 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 href='https://fonts.googleapis.com/css?family=RobotoDraft' rel='stylesheet' type='text/css'>
  8. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"><style>
  9. html,body,h1,h2,h3,h4,h5 {font-family: "RobotoDraft", "Roboto", sans-serif}
  10. .w3-bar-block .w3-bar-item {padding: 16px}
  11. </style>
  12. <body>
  13. <!-- Side Navigation -->
  14. <nav class="w3-sidebar w3-bar-block w3-collapse w3-white w3-animate-left w3-card" style="z-index:3;width:320px;" id="mySidebar">
  15. <a href="javascript:void(0)" class="w3-bar-item w3-button w3-border-bottom w3-large"><img src="https://www.w3schools.com/https://www.w3schools.com/images/w3schools.png" style="width:60%;"></a>
  16. <a href="javascript:void(0)" onclick="w3_close()" title="Close Sidemenu"
  17. class="w3-bar-item w3-button w3-hide-large w3-large">Close <i class="fa fa-remove"></i></a>
  18. <a href="javascript:void(0)" class="w3-bar-item w3-button w3-dark-grey w3-button w3-hover-black w3-left-align" onclick="document.getElementById('id01').style.display='block'">New Message <i class="w3-padding fa fa-pencil"></i></a>
  19. <a id="myBtn" onclick="myFunc('Demo1')" href="javascript:void(0)" class="w3-bar-item w3-button"><i class="fa fa-inbox w3-margin-right"></i>Inbox (3)<i class="fa fa-caret-down w3-margin-left"></i></a>
  20. <div id="Demo1" class="w3-hide w3-animate-left">
  21. <a href="javascript:void(0)" class="w3-bar-item w3-button w3-border-bottom test w3-hover-light-grey" onclick="openMail('Borge');w3_close();" id="firstTab">
  22. <div class="w3-container">
  23. <img class="w3-round w3-margin-right" src="https://www.w3schools.com//w3images/avatar3.png" style="width:15%;"><span class="w3-opacity w3-large">Borge Refsnes</span>
  24. <h6>Subject: Remember Me</h6>
  25. <p>Hello, i just wanted to let you know that i'll be home at...</p>
  26. </div>
  27. </a>
  28. <a href="javascript:void(0)" class="w3-bar-item w3-button w3-border-bottom test w3-hover-light-grey" onclick="openMail('Jane');w3_close();">
  29. <div class="w3-container">
  30. <img class="w3-round w3-margin-right" src="https://www.w3schools.com//w3images/avatar5.png" style="width:15%;"><span class="w3-opacity w3-large">Jane Doe</span>
  31. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit...</p>
  32. </div>
  33. </a>
  34. <a href="javascript:void(0)" class="w3-bar-item w3-button w3-border-bottom test w3-hover-light-grey" onclick="openMail('John');w3_close();">
  35. <div class="w3-container">
  36. <img class="w3-round w3-margin-right" src="https://www.w3schools.com//w3images/avatar2.png" style="width:15%;"><span class="w3-opacity w3-large">John Doe</span>
  37. <p>Welcome!</p>
  38. </div>
  39. </a>
  40. </div>
  41. <a href="#" class="w3-bar-item w3-button"><i class="fa fa-paper-plane w3-margin-right"></i>Sent</a>
  42. <a href="#" class="w3-bar-item w3-button"><i class="fa fa-hourglass-end w3-margin-right"></i>Drafts</a>
  43. <a href="#" class="w3-bar-item w3-button"><i class="fa fa-trash w3-margin-right"></i>Trash</a>
  44. </nav>
  45. <!-- Modal that pops up when you click on "New Message" -->
  46. <div id="id01" class="w3-modal" style="z-index:4">
  47. <div class="w3-modal-content w3-animate-zoom">
  48. <div class="w3-container w3-padding w3-red">
  49. <span onclick="document.getElementById('id01').style.display='none'"
  50. class="w3-button w3-red w3-right w3-xxlarge"><i class="fa fa-remove"></i></span>
  51. <h2>Send Mail</h2>
  52. </div>
  53. <div class="w3-panel">
  54. <label>To</label>
  55. <input class="w3-input w3-border w3-margin-bottom" type="text">
  56. <label>From</label>
  57. <input class="w3-input w3-border w3-margin-bottom" type="text">
  58. <label>Subject</label>
  59. <input class="w3-input w3-border w3-margin-bottom" type="text">
  60. <input class="w3-input w3-border w3-margin-bottom" style="height:150px" placeholder="What's on your mind?">
  61. <div class="w3-section">
  62. <a class="w3-button w3-red" onclick="document.getElementById('id01').style.display='none'">Cancel  <i class="fa fa-remove"></i></a>
  63. <a class="w3-button w3-light-grey w3-right" onclick="document.getElementById('id01').style.display='none'">Send  <i class="fa fa-paper-plane"></i></a>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <!-- Overlay effect when opening the side navigation on small screens -->
  69. <div class="w3-overlay w3-hide-large w3-animate-opacity" onclick="w3_close()" style="cursor:pointer" title="Close Sidemenu" id="myOverlay"></div>
  70. <!-- Page content -->
  71. <div class="w3-main" style="margin-left:320px;">
  72. <i class="fa fa-bars w3-button w3-white w3-hide-large w3-xlarge w3-margin-left w3-margin-top" onclick="w3_open()"></i>
  73. <a href="javascript:void(0)" class="w3-hide-large w3-red w3-button w3-right w3-margin-top w3-margin-right" onclick="document.getElementById('id01').style.display='block'"><i class="fa fa-pencil"></i></a>
  74. <div id="Borge" class="w3-container person">
  75. <br>
  76. <img class="w3-round w3-animate-top" src="https://www.w3schools.com//w3images/avatar3.png" style="width:20%;">
  77. <h5 class="w3-opacity">Subject: Remember Me</h5>
  78. <h4><i class="fa fa-clock-o"></i> From Borge Refsnes, Sep 27, 2015.</h4>
  79. <a class="w3-button w3-light-grey" href="#">Reply<i class="w3-margin-left fa fa-mail-reply"></i></a>
  80. <a class="w3-button w3-light-grey" href="#">Forward<i class="w3-margin-left fa fa-arrow-right"></i></a>
  81. <hr>
  82. <p>Hello, i just wanted to let you know that i'll be home at 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. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum 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>
  83. <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. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum 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>
  84. <p>Best Regards, <br>Borge Refsnes</p>
  85. </div>
  86. <div id="Jane" class="w3-container person">
  87. <br>
  88. <img class="w3-round w3-animate-top" src="https://www.w3schools.com//w3images/avatar5.png" style="width:20%;">
  89. <h5 class="w3-opacity">Subject: None</h5>
  90. <h4><i class="fa fa-clock-o"></i> From Jane Doe, Sep 25, 2015.</h4>
  91. <a class="w3-button w3-light-grey">Reply<i class="w3-margin-left fa fa-mail-reply"></i></a>
  92. <a class="w3-button w3-light-grey">Forward<i class="w3-margin-left fa fa-arrow-right"></i></a>
  93. <hr>
  94. <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. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum 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>
  95. <p>Forever yours,<br>Jane</p>
  96. </div>
  97. <div id="John" class="w3-container person">
  98. <br>
  99. <img class="w3-round w3-animate-top" src="https://www.w3schools.com//w3images/avatar2.png" style="width:20%;">
  100. <h5 class="w3-opacity">Subject: None</h5>
  101. <h4><i class="fa fa-clock-o"></i> From John Doe, Sep 23, 2015.</h4>
  102. <a class="w3-button w3-light-grey">Reply<i class="w3-margin-left fa fa-mail-reply"></i></a>
  103. <a class="w3-button w3-light-grey">Forward<i class="w3-margin-left fa fa-arrow-right"></i></a>
  104. <hr>
  105. <p>Welcome.</p>
  106. <p>That's it!</p>
  107. </div>
  108. </div>
  109. <script>
  110. var openInbox = document.getElementById("myBtn");
  111. openInbox.click();
  112. function w3_open() {
  113. document.getElementById("mySidebar").style.display = "block";
  114. document.getElementById("myOverlay").style.display = "block";
  115. }
  116. function w3_close() {
  117. document.getElementById("mySidebar").style.display = "none";
  118. document.getElementById("myOverlay").style.display = "none";
  119. }
  120. function myFunc(id) {
  121. var x = document.getElementById(id);
  122. if (x.className.indexOf("w3-show") == -1) {
  123. x.className += " w3-show";
  124. x.previousElementSibling.className += " w3-red";
  125. } else {
  126. x.className = x.className.replace(" w3-show", "");
  127. x.previousElementSibling.className =
  128. x.previousElementSibling.className.replace(" w3-red", "");
  129. }
  130. }
  131. openMail("Borge")
  132. function openMail(personName) {
  133. var i;
  134. var x = document.getElementsByClassName("person");
  135. for (i = 0; i < x.length; i++) {
  136. x[i].style.display = "none";
  137. }
  138. x = document.getElementsByClassName("test");
  139. for (i = 0; i < x.length; i++) {
  140. x[i].className = x[i].className.replace(" w3-light-grey", "");
  141. }
  142. document.getElementById(personName).style.display = "block";
  143. event.currentTarget.className += " w3-light-grey";
  144. }
  145. </script>
  146. <script>
  147. var openTab = document.getElementById("firstTab");
  148. openTab.click();
  149. </script>
  150. </body>
  151. </html>



Try Your Self ->



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

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