-
Notifications
You must be signed in to change notification settings - Fork 534
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 #115 from AbhineshJha/footer
added a responsive footer
- Loading branch information
Showing
6 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
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
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,49 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="../../logo.svg" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<script src="../../helpers/challenges.js" type="module" defer></script> | ||
<link rel="stylesheet" href="style.css"> | ||
<title>Enhanced Responsive Footer</title> | ||
<script src="https://kit.fontawesome.com/61673b2d06.js" crossorigin="anonymous"></script> | ||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<footer> | ||
<div class="footer-content"> | ||
<div class="footer-logo"> | ||
<img src="logo.png" alt="Company Logo"> | ||
</div> | ||
<div class="footer-links"> | ||
<ul> | ||
<li><a href="#">Home</a></li> | ||
<li><a href="#">About Us</a></li> | ||
<li><a href="#">Services</a></li> | ||
<li><a href="#">Contact</a></li> | ||
</ul> | ||
</div> | ||
<div class="footer-social"> | ||
<ul> | ||
<li><a href="#"><i class="fab fa-facebook"></i></a></li> | ||
<li><a href="#"><i class="fab fa-twitter"></i></a></li> | ||
<li><a href="#"><i class="fab fa-linkedin"></i></a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
<div class="footer-contact"> | ||
<p>Contact Us: <a href="mailto:info@example.com">info@example.com</a></p> | ||
</div> | ||
<div class="footer-bottom"> | ||
© 2023 Company Name. All rights reserved. | ||
</div> | ||
</footer> | ||
</div> | ||
<script src="script.js"></script> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// JavaScript functionality for toggling the mobile navigation menu | ||
const toggleMenu = () => { | ||
const footerLinks = document.querySelector('.footer-links ul'); | ||
footerLinks.classList.toggle('show'); | ||
}; | ||
|
||
const menuButton = document.querySelector('.footer-links button'); | ||
menuButton.addEventListener('click', toggleMenu); |
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,81 @@ | ||
/* Reset some default styles */ | ||
body, ul { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
/* Define styles for the footer */ | ||
.container { | ||
max-width: 1200px; | ||
margin: 0 auto; | ||
padding: 20px; | ||
} | ||
|
||
footer { | ||
background-color: #7f3535; | ||
color: #fff; | ||
padding: 20px; | ||
border-top: 2px solid #555; | ||
} | ||
|
||
.footer-content { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
.footer-logo img { | ||
max-width: 100px; | ||
background: white; | ||
border-radius: 85px; | ||
} | ||
|
||
.footer-links ul, | ||
.footer-social ul { | ||
list-style: none; | ||
font-size: 25px; | ||
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; | ||
padding: 0; | ||
} | ||
|
||
.footer-links ul li, | ||
.footer-social ul li { | ||
margin: 5px 0; | ||
} | ||
|
||
.footer-links a, | ||
.footer-social a { | ||
text-decoration: none; | ||
color: #fff; | ||
} | ||
|
||
.footer-contact p { | ||
margin: 10px 0; | ||
} | ||
|
||
.footer-contact a { | ||
color: #fff; | ||
} | ||
|
||
.footer-bottom { | ||
text-align: center; | ||
padding-top: 10px; | ||
} | ||
|
||
/* Media query for responsiveness */ | ||
@media screen and (min-width: 768px) { | ||
.footer-content { | ||
flex-direction: row; /* Display elements in a row on larger screens */ | ||
justify-content: space-between; /* Add spacing between elements */ | ||
align-items: center; /* Vertically align content */ | ||
text-align: left; /* Reset text alignment */ | ||
} | ||
.footer-logo img { | ||
margin-bottom: 10px; | ||
} | ||
|
||
.footer-links ul, | ||
.footer-social ul { | ||
text-align: center; | ||
} | ||
} |