forked from Code-Social/official-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Code-Social#3 from Rizwan102003/rizz
initial commit
- Loading branch information
Showing
4 changed files
with
140 additions
and
17 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// JavaScript for dropdown menu functionality | ||
|
||
document.addEventListener('DOMContentLoaded', () => { | ||
const navbarItems = document.querySelectorAll('.navbar ul li'); | ||
|
||
navbarItems.forEach(item => { | ||
item.addEventListener('mouseover', () => { | ||
const dropdown = item.querySelector('.dropdown'); | ||
if (dropdown) { | ||
dropdown.style.display = 'block'; | ||
} | ||
}); | ||
|
||
item.addEventListener('mouseout', () => { | ||
const dropdown = item.querySelector('.dropdown'); | ||
if (dropdown) { | ||
dropdown.style.display = 'none'; | ||
} | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* General Reset */ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f4f4f4; | ||
color: #333; | ||
} | ||
|
||
/* Navbar Styling */ | ||
.navbar { | ||
background-color: #333; | ||
padding: 10px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
.logo { | ||
height: 40px; | ||
} | ||
|
||
.navbar ul { | ||
list-style: none; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.navbar ul li { | ||
margin-left: 20px; | ||
} | ||
|
||
.navbar ul li a { | ||
text-decoration: none; | ||
color: #fff; | ||
padding: 8px 15px; | ||
transition: background-color 0.3s ease; | ||
} | ||
|
||
.navbar ul li a:hover { | ||
background-color: #555; | ||
border-radius: 4px; | ||
} | ||
|
||
/* Dropdown Menu */ | ||
.navbar ul li:hover .dropdown { | ||
display: block; | ||
} | ||
|
||
.dropdown { | ||
display: none; | ||
position: absolute; | ||
background-color: #333; | ||
padding: 10px; | ||
border-radius: 4px; | ||
z-index: 1; | ||
} | ||
|
||
.dropdown li { | ||
margin: 10px 0; | ||
} | ||
|
||
.dropdown li a { | ||
color: #fff; | ||
padding: 5px 10px; | ||
} | ||
|
||
.dropdown li a:hover { | ||
background-color: #555; | ||
border-radius: 4px; | ||
} | ||
|
||
/* Footer Styling */ | ||
footer { | ||
background-color: #333; | ||
padding: 20px; | ||
color: #fff; | ||
position: fixed; | ||
bottom: 0; | ||
width: 100%; | ||
} | ||
|
||
footer ul { | ||
list-style: none; | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
footer ul li { | ||
margin: 0 20px; | ||
text-align: center; | ||
} |