Skip to content

Commit

Permalink
🐛 Forced dropdown menu under header
Browse files Browse the repository at this point in the history
A lot a conflicting css so I chose to force 'top:44px'. It's not clean but it will do for now
  • Loading branch information
kraiss committed Nov 4, 2023
1 parent aa5c8ce commit c35a8a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/components/Menu.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ const path_en = path.replace('/fr/','/');
</a>
</div>
</div>

<div class="expand navbar-expand" id="menu">
<div class="navbar-expand">
<ul class="nav navbar-nav snc-nav">
<li class="dropdown">
<a href="#" class="snc-scroll dropdown-toggle" data-toggle="dropdown" role="button"
Expand Down
15 changes: 11 additions & 4 deletions src/styles/nav.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
.snc-header .snc-toggle i {
font-size: 26px
}
.snc-header .navbar-nav > li {
margin: 0 5px;
.snc-header .navbar-nav {
& > li:not(:last-child) {
margin-right: 20px;
}
}
.snc-header .navbar-nav li li {
min-width: 170px;
Expand Down Expand Up @@ -80,18 +82,23 @@
}

.snc-header .snc-navbar {
--bs-navbar-padding-y: 0;
--bs-navbar-padding-x: 0;
margin-bottom: 0;
border: none;
background: 0 0;
border-radius: 0
}

.snc-header .snc-navbar .snc-nav {
position: relative;
-webkit-animation-name: fadeInRight;
animation-name: fadeInRight;
transform-origin: center;
float: right
}

.navbar-expand .navbar-nav .dropdown-menu {
position: absolute;
top: 44px
}

.snc-header .snc-navbar .snc-nav li a {
Expand Down

0 comments on commit c35a8a8

Please sign in to comment.