NAVBAR DONE, HELL YEAH!!!!
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 152 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
+111
-5
@@ -21,7 +21,7 @@ header nav a {
|
||||
}
|
||||
|
||||
header nav a:hover {
|
||||
color: #45a049;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@@ -89,9 +89,9 @@ input {
|
||||
}
|
||||
|
||||
|
||||
main{
|
||||
main {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
z-index: -1;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
margin-top: 10%;
|
||||
padding: 20px 35px 35px 35px;
|
||||
@@ -100,6 +100,112 @@ main{
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.test{
|
||||
nav {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
}
|
||||
.divider {
|
||||
top: 0;
|
||||
width: 80%
|
||||
}
|
||||
|
||||
/* Add a black background color to the top navigation */
|
||||
.topnav {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 10px;
|
||||
background-color: #333;
|
||||
overflow: visible; /* Ensure dropdown content isn't clipped */
|
||||
z-index: 1000; /* Higher z-index to appear above other content */
|
||||
}
|
||||
|
||||
/* Style the links inside the navigation bar */
|
||||
.topnav a {
|
||||
color: #f2f2f2;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
/* Style the dropdown button */
|
||||
.dropdown .dropbtn {
|
||||
font-size: 17px;
|
||||
border: none;
|
||||
outline: none;
|
||||
color: white;
|
||||
background-color: inherit;
|
||||
padding: 14px 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Dropdown content */
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #f9f9f9;
|
||||
min-width: 160px;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
||||
right: 0; /* Ensures dropdown aligns with the button */
|
||||
z-index: 2000; /* Ensures it stays above the rest */
|
||||
}
|
||||
|
||||
/* Style the links inside the dropdown */
|
||||
.dropdown-content a {
|
||||
float: none; /* Ensure the links stack properly */
|
||||
color: black;
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* Add a dark background on hover */
|
||||
.topnav a:hover, .dropdown:hover .dropbtn {
|
||||
background-color: #555;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Add a grey background to dropdown links on hover */
|
||||
.dropdown-content a:hover {
|
||||
background-color: #ddd;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* Show the dropdown when the button is clicked */
|
||||
.dropdown.show .dropdown-content {
|
||||
display: block; /* Toggle visibility */
|
||||
}
|
||||
|
||||
/* Media query for smaller screens */
|
||||
@media screen and (max-width: 600px) {
|
||||
.topnav {
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropdown .dropbtn {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hide the icon on larger screens */
|
||||
.topnav .icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Show the icon only on smaller screens */
|
||||
@media screen and (max-width: 600px) {
|
||||
.topnav .icon {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user