forked from rebillar/site-accueil-insa
132 lines
2.1 KiB
CSS
132 lines
2.1 KiB
CSS
.menu {
|
|
position: fixed;
|
|
width: 100%;
|
|
height: fit-content;
|
|
z-index: 2;
|
|
overflow: visible;
|
|
transition: transform 0.3s;
|
|
bottom: 0;
|
|
}
|
|
|
|
|
|
#menu ul {
|
|
flex-wrap: wrap;
|
|
padding: 0;
|
|
margin: 0;
|
|
list-style: none;
|
|
display: flex;
|
|
justify-content: center;
|
|
color: #fff;
|
|
height: auto;
|
|
align-items: center;
|
|
background-color: rgba(64, 98, 63, 0.7); /* Add a semi-transparent background color for readability */
|
|
}
|
|
|
|
|
|
|
|
#menu li {
|
|
margin: 0 10px;
|
|
|
|
|
|
}
|
|
|
|
#menu a {
|
|
display: block; /* Add this line to make the link fill the entire menu item */
|
|
padding: 10px; /* Add some padding for better readability and clickable area */
|
|
color: #c32c2c;
|
|
text-decoration: none;
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
background-size: cover;
|
|
background-image: url('https://etud.insa-toulouse.fr/~mougnibas/accueil_2023/assets/img/buisson.svg');
|
|
|
|
}
|
|
|
|
#menu a:hover{
|
|
color: #e01111;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
|
|
|
|
|
|
/*hide the mobile menu by default*/
|
|
|
|
.topnav{
|
|
visibility: hidden;
|
|
height: 0px;
|
|
}
|
|
|
|
|
|
|
|
/* Add styles for smartphones screens */
|
|
@media all and (max-width: 800px) {
|
|
|
|
|
|
.menu{
|
|
visibility: hidden;
|
|
height: 0px;
|
|
}
|
|
|
|
|
|
/* Style the navigation menu */
|
|
.topnav {
|
|
visibility: visible;
|
|
overflow-y: scroll;
|
|
background-color: #333;
|
|
position: fixed;
|
|
width: 95%;
|
|
z-index: 100;
|
|
border-radius: 10px;
|
|
margin-top: 1vh;
|
|
height: auto;
|
|
margin-left: 2.5%;
|
|
margin-right: 2.5%;
|
|
}
|
|
|
|
/* Hide the links inside the navigation menu (except for logo/home) */
|
|
.topnav #mobile_menu_links {
|
|
display: none;
|
|
}
|
|
|
|
/* Style navigation menu links */
|
|
.topnav a {
|
|
color: white;
|
|
padding: 1vh 1vw;
|
|
text-decoration: none;
|
|
font-size: 4vh;
|
|
display: block;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
text-align: center;
|
|
}
|
|
|
|
.topnav li {
|
|
display: flex;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Style the hamburger menu */
|
|
.topnav a.icon {
|
|
background: black;
|
|
display: block;
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
}
|
|
|
|
/* Add a grey background color on mouse-over */
|
|
.topnav a:hover {
|
|
background-color: #ddd;
|
|
color: black;
|
|
}
|
|
|
|
.active {
|
|
background-color: rgb(27, 170, 22);;
|
|
color: white;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|