-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDropdownSidebar.htm
More file actions
228 lines (210 loc) · 5.57 KB
/
DropdownSidebar.htm
File metadata and controls
228 lines (210 loc) · 5.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
header{
position: absolute; top: 0; width: 100%;
}
ul {
list-style-type: none; margin: 0; overflow: hidden; background-color: #333;
padding-left: 50px; height: 50px;
}
body{
margin:0; padding:0;
}
.content{
background:white; width:100%; height:700px;
}
#footer{
background: #f1f1f1; height:250px; padding-left: 150px;
}
#bottom-footer{
background: #D4D2D6; height:70px; padding-left: 50px;
}
.column {
float: left; width: 20%; padding: 10px;
}
.row:after {
content: ""; display: table; clear: both;
}
footer{
width: 100%;
}
section:after {
content: ""; display: table; clear: both;
}
section{
padding-right: 200px; padding-left: 200px;
}
article {
float: left;width: 100%;background-color: #D4D2D6; border-radius: 5px; padding: 50px; height:600px;
}
li a {
float: left; display: block; text-align: center; padding: 14px 16px; text-decoration: none; color: white;
}
.search-container {
float: right; padding: 6px 10px; margin-top: 6px; margin-right: 250px;
}
p a:link {
color: #494949; background-color: transparent; text-decoration: none;
}
p a:hover {
color: #3F5FF0; background-color: transparent; text-decoration: underline;
}
li.v{
color: white; font-size:35px; background-color: transparent; text-decoration: none;
font-style: italics; position: absolute; top: -15px; right: 90px;
}
.fa {
padding: 20px; font-size: 15px; width: 15px; text-align: center; text-decoration: none; margin: 5px 2px; border-radius: 50%; float: right;
}
.fa:hover {
opacity: 0.7;
}
.fa-snapchat-ghost {
background: #fffc00; color: white; text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}
.fa-facebook {
background: #3B5998; color: white;
}
.fa-instagram {
background: #125688; color: white;
}
.fa-twitter {
background: #55ACEE; color: white;
}
.fa-google {
background: #dd4b39; color: white;
}
.sidenav {
height: 100%;
width: 140px;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #333;
overflow-x: hidden;
padding-top: 20px;
}
.sidenav a, .dropdown-btn {
padding: 6px 8px 6px 16px;
text-decoration: none;
font-size: 15px;
color: #818181;
display: block;
border: none;
background: none;
width: 100%;
text-align: left;
cursor: pointer;
outline: none;
}
.active {
background-color: green;
color: white;
}
.sidenav a {
padding: 6px 8px 6px 16px;
text-decoration: none;
font-size: 15px;
color: #818181;
display: block;
}
.sidenav a:hover {
color: #f1f1f1;
}
.dropdown-container {
display: none;
background-color: #262626;
padding-left: 8px;
}
.main {
margin-left: 160px; /* Same as the width of the sidenav */
font-size: 28px; /* Increased text to enable scrolling */
padding: 0px 10px;
}
</style>
<body>
<header>
<ul>
<li style="float:right; padding-right: 20px"; class="v"><a href="FullPageFormat.htm"><font face="Brush Script MT">SomeName</font></a></li>
<div class="search-container">
<form action="/action_page.php">
<input type="text" placeholder="Search.." name="search">
</form>
</div>
</ul>
</header>
<section>
<article>
<h2>This sidebar has a dropdown, pretty cool for $0.00.</h2>
<div class="sidenav">
<button class="dropdown-btn">Dropdown</button>
<div class="dropdown-container">
<a href="Buttons.htm">Buttons</a>
<a href="Timers.htm">Timers</a>
<a href="Animations.htm">Animations</a>
<a href="Sidebar.htm">Sidebar</a>
<a href="Forms.htm">Forms</a>
<a href="Miscellaneous.htm">Miscellaneous</a>
</div>
</div>
</article>
</section>
<footer>
<div id="footer">
<div class="row">
<div class="column" style="color:black;">
<h3>Help & Info</h3>
<p><a href="Help.htm">Help</a></p>
<p><a href="Help.htm">FAQ</a></p>
<p><a href="Help.htm">Discounts</a></p>
<p><a href="Help.htm">Delivery</a></p>
<p><a href="Help.htm">Customer Service</a></p>
</div>
<div class="column">
<h3>About Store</h3>
<p><a href="Help.htm">About SomeName</a></p>
<p><a href="Help.htm">Store Locations</a></p>
<p><a href="Help.htm">Careers</a></p>
<p><a href="Help.htm">Events</a></p>
</div>
<div class="column">
<h3>More</h3>
<p><a href="Help.htm">Members</a></p>
<p><a href="Help.htm">Shopping Cart</a></p>
<p><a href="Help.htm">Contact Us</a></p>
</div>
</div>
</div>
<div id="bottom-footer">
<div class = "inner-wrap clearfix" style ="list-style-type: none";>
<li style="float: left; display: block; text-align: center; padding: 14px 16px; text-decoration: none;"><font face="Brush Script MT">™SomeName</font></li>
<a href="#" class="fa fa-snapchat-ghost"></a>
<a href="#" class="fa fa-instagram"></a>
<a href="#" class="fa fa-facebook"></a>
<a href="#" class="fa fa-google"></a>
<a href="#" class="fa fa-twitter"></a>
</div>
</div>
</footer>
<script>
var dropdown = document.getElementsByClassName("dropdown-btn");
var i;
for (i = 0; i < dropdown.length; i++) {
dropdown[i].addEventListener("click", function() {
this.classList.toggle("active");
var dropdownContent = this.nextElementSibling;
if (dropdownContent.style.display === "block") {
dropdownContent.style.display = "none";
} else {
dropdownContent.style.display = "block";
}
});
}
</script>
</body>
</html>