Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed navbar #1132

Merged
merged 5 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 125 additions & 59 deletions index.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,82 +124,148 @@ option {
.img p{
display: none;
}
@media only screen and (max-width: 820px) {
@media (max-width: 820px) {
.nav_menu {
flex-direction: column;
}

.hamburger {
display: block;
display: flex;
}

.header_container {
flex-direction: column;
align-items: start;
height: 24.8rem;
transition: 0.55s all ease-out;
/* padding-top: 5px; */

.mobile-logo-text {
display: block;
}

.nav_link {
flex-direction: column;
position: relative;
bottom: 40px;
display: none;
flex-direction: column;
position: fixed;
top: 60px;
right: 0;
background-color: #022a2d;
width: 100%;
padding: 20px;
z-index: 10;
box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
}

/* .nav-link li{
margin-bottom: 5px;
} */
.nav-h {
height: 5.5rem;
width: 100vw;

.nav_link.active {
display: flex;
}

.nav_link li {
margin: 10px 0;
}

.nav_link a {
font-size: 1.2em;
}

.nav_link .btn1 {
width: 100%;
text-align: center;
}
}

.vis-h {
opacity: 0;
@media (max-width: 880px) {
.nav_menu {
flex-direction: column;
}

.hamburger {
display: flex;
}
.img img{

.mobile-logo-text {
display: inline-block;
color: white;
font-weight: bold;
margin-left: 50px;
margin-right: 16rem;
font-size: 40px;
}
#rd-logo {
margin-left: 21rem;
margin-right: -6rem;
}

.nav_link {
display: none;
flex-direction: column;
position: fixed;
top: 60px;
left: 20px;
margin-top: 25px;
background-color: #022a2d;
width: 30%;
padding: 20px;
z-index: 10;
box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
}
.img p{
display: block;
position: relative;
left: 300px;
bottom: 0;

.nav_link.active {
display: flex;
}
}

@media screen and (max-width: 992px) {
.container {
flex-wrap: wrap;
justify-content: center;

.nav_link li {
margin: 10px 0;
}

.sec-img {
max-width: 100%;
margin: 20px 0;
position: relative;
top: 0;
right: 0;


.nav_link a {
font-size: 1.2em;
}

.content {
text-align: center;
padding: 10px;
.nav_link .btn1 {
width: 100%;
text-align: center;
}
}
}

@media screen and (max-width: 768px) {
.content {
text-align: center;
padding: 10px;
@media (max-width: 768px) {
.nav_menu {
flex-direction: column;
}

.sec-img {
max-width: 100%;
margin: 20px 0;
position: relative;
top: 0;
right: 0;

.hamburger {
display: flex;
}
}

.mobile-logo-text {
display: block;
}

.nav_link {
display: none;
flex-direction: column;
position: fixed;
top: 60px;
left: 20px;
background-color: #022a2d;
width: 30%;
margin-top: 30px;
padding: 20px;
z-index: 10;
box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
}

.nav_link.active {
display: flex;
}

.nav_link li {
margin: 10px 0;
}

.nav_link a {
font-size: 1.2em;
}

.nav_link .btn1 {
width: 100%;
text-align: center;
}
}

/*Preloader CSS*/
.pre {
Expand Down
7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@
</ul>
</nav>
</header>
<script>
function toggleMenu() {
const navLinks = document.querySelector('.nav_link');
navLinks.classList.toggle('active');
}

</script>
<header id="header" class="fixed-top">
<div class="container d-flex align-items-center">
<a href="#appointment" class="appointment-btn scrollto">
Expand Down
Loading