Skip to content

Commit

Permalink
navbar button hover range fix
Browse files Browse the repository at this point in the history
  • Loading branch information
leo.sibour committed Sep 16, 2024
1 parent d928f8e commit a7a6785
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 359 deletions.
4 changes: 2 additions & 2 deletions html/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>Responsive Navigation</title>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">

<link rel="stylesheet" type="text/css" href="../style/nav-bar.css" />
<link rel="stylesheet" type="text/css" href="../style/download_style.css" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
Expand All @@ -18,7 +18,7 @@

<nav class="desk">
<ul>
<li><a href="../index.html">home</a></li>
<li><a href="../index.html">home</a></li>
<li class="active"><a href="download.html">Download</a></li>
<li><a href="#">About us</a></li>
<li><a href="#">Realisation</a></li>
Expand Down
5 changes: 2 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
<title>Responsive Navigation</title>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">

<link rel="stylesheet" type="text/css" href="./style/home_style.css" />
<link rel="stylesheet" type="text/css" href="style/nav-bar.css" />
<link rel="stylesheet" type="text/css" href="style/home_style.css" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="./js/nav-bar.js"></script>

</head>
<body>
<div class="container">

<nav class="desk">
<ul>
<li class="active"><a href="index.html">home</a></li>
Expand Down
177 changes: 0 additions & 177 deletions style/download_style.css
Original file line number Diff line number Diff line change
@@ -1,177 +0,0 @@
* {
margin: 0;
padding: 0;
user-select: none;
box-sizing: border-box;
}

body {
font-family: "Roboto", sans-serif;
background-color: #f5f5f5;
color: #333;
}


.container nav.desk,
.container nav.mob {
position: fixed;
top: 0;
left: 0;
width: 100%;
background: #2c3e50;
height: 60px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
z-index: 1000;
}


nav.desk ul {
list-style: none;
width: 70%;
height: 60px;
margin: 0 auto;
display: flex;
justify-content: space-around;
align-items: center;
}

/* Styling for Desktop and Mobile Nav Items */
nav.desk ul li,
nav.mob ul li {
display: flex;
justify-content: center;
align-items: center;
padding: 10px 20px;
height: 100%;
width: auto;
text-transform: uppercase;
font-weight: 600;
font-size: 16px;
transition: all 0.3s ease;
cursor: pointer;
border-radius: 4px;
}

/* Hover and Active States */
nav.desk ul li:hover,
nav.mob ul li:hover {
background: #34495e;
transition: background 0.3s ease;
}

nav.desk ul li.active,
nav.mob ul li.active {
background: #16a085;
}

nav ul li a {
color: #ecf0f1;
text-decoration: none;
display: block;
width: 100%;
text-align: center;
}

/* Mobile Navigation */
.mob {
display: none;
}


@media screen and (max-width: 700px) {
nav.desk {
display: none;
}

nav.mob {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
}

.hamburger-btn {
width: 45px;
height: 45px;
background-color: #16a085;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
z-index: 2000;
}

.hamburger-btn i {
font-size: 24px;
color: white;

}

.hamburger-btn .fa-times {
display: none;
padding: 14px 15px;
width: 50px;
height: 50px;
}

.fas{
padding: 13px 14px;
width: 50px;
height: 50px;
}

.mob ul { /*nav mobil elements*/
position: absolute;
top: 60px;
left: 0;
width: 100%;
background: #2c3e50;
display: none;
list-style: none;
padding: 0;
}

.mob ul.active {
display: block;
}

.mob ul li {
text-align: center;
padding: 0;
color: white;
font-size: 20px;
text-transform: uppercase;
}
.header{
width: 50%;
height: 600px;

}
}


.header {
width: 100%;
height: 1000px;
background: #ffffff url("word_search_solver2.jpg") no-repeat center center;
/* background-size: cover; */

position: relative;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 0;
}


.header .title {
text-align: center;
padding-top: 250px;
font-size: 45px;
color: #ecf0f1;
text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
letter-spacing: 2px;
font-family: "Lobster", cursive;
}
177 changes: 0 additions & 177 deletions style/home_style.css
Original file line number Diff line number Diff line change
@@ -1,177 +0,0 @@
* {
margin: 0;
padding: 0;
user-select: none;
box-sizing: border-box;
}

body {
font-family: "Roboto", sans-serif;
background-color: #f5f5f5;
color: #333;
}


.container nav.desk,
.container nav.mob {
position: fixed;
top: 0;
left: 0;
width: 100%;
background: #2c3e50;
height: 60px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
z-index: 1000;
}


nav.desk ul {
list-style: none;
width: 70%;
height: 60px;
margin: 0 auto;
display: flex;
justify-content: space-around;
align-items: center;
}

/* Styling for Desktop and Mobile Nav Items */
nav.desk ul li,
nav.mob ul li {
display: flex;
justify-content: center;
align-items: center;
padding: 10px 20px;
height: 100%;
width: auto;
text-transform: uppercase;
font-weight: 600;
font-size: 16px;
transition: all 0.3s ease;
cursor: pointer;
border-radius: 4px;
}

/* Hover and Active States */
nav.desk ul li:hover,
nav.mob ul li:hover {
background: #34495e;
transition: background 0.3s ease;
}

nav.desk ul li.active,
nav.mob ul li.active {
background: #16a085;
}

nav ul li a {
color: #ecf0f1;
text-decoration: none;
display: block;
width: 100%;
text-align: center;
}

/* Mobile Navigation */
.mob {
display: none;
}


@media screen and (max-width: 700px) {
nav.desk {
display: none;
}

nav.mob {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
}

.hamburger-btn {
width: 45px;
height: 45px;
background-color: #16a085;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
z-index: 2000;
}

.hamburger-btn i {
font-size: 24px;
color: white;

}

.hamburger-btn .fa-times {
display: none;
padding: 14px 15px;
width: 50px;
height: 50px;
}

.fas{
padding: 13px 14px;
width: 50px;
height: 50px;
}

.mob ul { /*nav mobil elements*/
position: absolute;
top: 60px;
left: 0;
width: 100%;
background: #2c3e50;
display: none;
list-style: none;
padding: 0;
}

.mob ul.active {
display: block;
}

.mob ul li {
text-align: center;
padding: 0;
color: white;
font-size: 20px;
text-transform: uppercase;
}
.header{
width: 50%;
height: 600px;

}
}


.header {
width: 100%;
height: 1000px;
background: #ffffff url("word_search_solver2.jpg") no-repeat center center;
/* background-size: cover; */

position: relative;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 0;
}


.header .title {
text-align: center;
padding-top: 250px;
font-size: 45px;
color: #ecf0f1;
text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
letter-spacing: 2px;
font-family: "Lobster", cursive;
}
Loading

0 comments on commit a7a6785

Please sign in to comment.