Advertisement
Pwahaha

Untitled

Jan 13th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Title name</title>
  6. <link rel="shortcut icon" href="https://reia.neocities.org/etc/favicon.gif" />
  7. <link href="/style.css" rel="stylesheet" type="text/css" media="all">
  8.  
  9. <style>
  10. /* paste all of the content inside <style> into style.css + include the the above /style.css code to get the same look on all your pages */
  11.  
  12. /* if you wish to have a solid colour, remove background-image! */
  13. body {
  14. background: #00000;
  15. background-image: url('background link here');
  16. background-repeat: repeat-y repeat-x;
  17. font-family: times;
  18. font-size: 80%
  19. }
  20.  
  21. .container{
  22. width:500px;
  23. background-color:white;
  24. margin-left: auto;
  25. margin-right:auto;
  26. border: 1px solid #ccc;
  27. height:300px
  28. }
  29.  
  30. .container2{
  31. width:460px;
  32. background-color:white;
  33. margin-left: auto;
  34. margin-right:auto;
  35. border: 1px solid #ccc;
  36. height:50px;
  37. padding:20px;
  38. overflow:auto;
  39. }
  40.  
  41. .tab {
  42. width:100px
  43. overflow: hidden;
  44. border: 1px solid #ccc;
  45. background-color: #f1f1f1;
  46. }
  47.  
  48. .tab button {
  49. background-color: inherit;
  50. float: left;
  51. border: none;
  52. outline: none;
  53. cursor: pointer;
  54. padding: 14px 16px;
  55. transition: 0.3s;
  56. }
  57.  
  58. .tab button:hover {
  59. background-color: #ddd;
  60. }
  61.  
  62. .tab button.active {
  63. background-color: #ccc;
  64. }
  65.  
  66. .tabcontent {
  67. display: none;
  68. height:280px;
  69. padding: 0px 15px 15px;
  70. border-top: none;
  71. text-align:center; /* change to left if you don't like centered text */
  72. overflow: auto;
  73. }
  74.  
  75.  
  76. </style>
  77. </head>
  78.  
  79. <body>
  80.  
  81. <div class="container">
  82.  
  83. <!-- if you wish to use this container as a page instead of a separate html, replace the href with javascript:void(0) ! -->
  84. <!-- the text in ' ' after 'event' is the name of the container page btw -->
  85. <!-- XY is the text that shows up on the navigation -->
  86.  
  87. <ul class="tab">
  88. <li><a href="javascript:void(0)" class="tablinks" onclick="openCity(event, 'Home')" id="defaultOpen">Home︎</a></li>
  89. <li><a href="html page link here" class="tablinks" onclick="openCity(event, 'X')">XY</a></li>
  90. <li><a href="html page link here" class="tablinks" onclick="openCity(event, 'X')">XY</a></li>
  91. <li><a href="html page link here" class="tablinks" onclick="openCity(event, 'X')">XY</a></li>
  92. </ul>
  93.  
  94. <div id="Home" class="tabcontent">
  95. <p>place your content here !</p>
  96. </div>
  97.  
  98. </div>
  99.  
  100. <br><br>
  101.  
  102. <div class="container2">
  103. <div align=center>
  104. <p><a href="https://pastebin.com/gWRHG6N5">code</a></p>
  105. </div>
  106.  
  107. </div>
  108.  
  109. <script>
  110. function openCity(evt, cityName) {
  111. var i, tabcontent, tablinks;
  112. tabcontent = document.getElementsByClassName("tabcontent");
  113. for (i = 0; i < tabcontent.length; i++) {
  114. tabcontent[i].style.display = "none";
  115. }
  116. tablinks = document.getElementsByClassName("tablinks");
  117. for (i = 0; i < tablinks.length; i++) {
  118. tablinks[i].className = tablinks[i].className.replace(" active", "");
  119. }
  120. document.getElementById(cityName).style.display = "block";
  121. evt.currentTarget.className += " active";
  122. }
  123.  
  124. // Get the element with id="defaultOpen" and click on it
  125. document.getElementById("defaultOpen").click();
  126. </script>
  127.  
  128. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement