-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnikitmehtastyles.css
123 lines (107 loc) · 2.64 KB
/
nikitmehtastyles.css
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
/* Existing styles for links */
.navbar-link {
display: block;
color: black;
text-align: center;
padding: 14px 20px;
text-decoration: none;
}
.dropdown {
position: relative;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #ddd;
min-width: 160px;
z-index: 1;
top: 100%; /* Position dropdown below the parent */
left: 50%; /* Align dropdown with center of parent */
transform: translateX(-50%); /* Adjust for half of dropdown width */
text-align: center; /* Center-align dropdown content */
}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown-content .dropdown-link {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: center; /* Center-align dropdown links */
}
.dropdown-content .dropdown-link:hover {
background-color: #ddd;
color: black;
}
/* Make the navbar horizontal for PCs */
@media screen and (min-width: 601px) {
.navbar {
display: flex;
justify-content: space-around;
align-items: center;
background-image: linear-gradient(to bottom, lightpink, white); /* Gradient background */
}
.dropdown {
position: static;
}
.dropdown:hover .dropdown-content {
display: none;
}
.dropdown:hover {
display: block;
position: relative;
}
.dropdown-content {
width: 160px;
}
.dropdown-content .dropdown-link:hover {
background-color: #ddd;
color: black;
}
}
/* Make the navbar vertical for mobile devices */
@media screen and (max-width: 600px) {
.navbar {
display: block;
background-image: linear-gradient(to bottom, lightpink, white); /* Gradient background */
}
}
#sidebar {
position: fixed;
top: 0;
left: 0;
width: 0; /* Initially hidden */
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
overflow: hidden;
z-index: -1;
transition: width 0.3s ease; /* Smooth transition */
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
#sidebar.open {
width: calc(100vw / 6); /* Set the width to one-sixth of the viewport width */
}
#menu-toggle {
position: absolute;
top: 10px;
left: 10px;
cursor: pointer;
z-index: 1001; /* Ensure it's above the sidebar */
color: black;
}
.word {
z-index: 1000;
color: white;
font-size: 20px;
opacity: 0; /* Initially hidden */
transition: opacity 0.5s ease; /* Smooth transition */
position: absolute; /* Position the words on top of the sidebar */
}
#space {
width: 100%;
height: 100%;
}