Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

Sandwich button in Agency theme

Started by Alessandro 9 years ago · 4 replies · 975 views
9 years ago

Please I need your assistance. How can I change the width at which the sandwich button on top right appears and the standard top menu disappears? Currently the breakpoint is (I guess) 768px, but that's too low for my needs. In global.css I have edited this entry:

@media(min-width:768px){.navbar-toggle{display:none}}

into this one

@media(min-width:1024px){.navbar-toggle{display:none}}

but unfortunately that did not do the trick.

Anyone using Agency theme can help me here? That would be much appreciated. Thanks.

9 years ago

Hi @gilibaus,

Same question here with my theme based on Antimatter. I have +8 items in my navigation menu, so if I visit my website from an iPad (for example), the navigation menu appears below the logo of the website.

I have found an SCSS file that defines breakpoints, but I can't edit it as easily as a classic CSS file (I'm using Sublime Text + FileZilla on a Windows computer)... :frowning_face:

An issue was open 2 years ago on GitHub but nobody seems to be able to resolve it :
https://github.com/getgrav/grav-theme-antimatter/issues/35

So for instance, I'm stuck, just like you.

Does anyone can help us?
Thanks!

9 years ago

Yeah, clean up your navigation, restyle your navigation or update Bootstrap in the theme to the latest, as version 3rd does not allow changing breakpoint in easy way.

9 years ago

In the end, I finally managed to deal with the breakpoints by adding these lines in my custom.css file :

CSS
@media only all and (max-width: 89.938em) {
  #header #navbar ul.navigation {
    display: none !important; } }
@media only all and (max-width: 89.938em) {
  #header #navbar .panel-activation {
    display: inline-block !important; } }

@media (min-width: 1200px) {
  .sb-width-thin {
    width:15% !important; } }

The first block controls the (de)activation of the standard menu vs. the panel menu while the second block gives the side panel some space to breathe.

Feel free to copy and edit my workaround if you want @gilibaus 😉

👍 1
8 years ago

Worked perfectly! Saved me alot of work! Thanks!

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 197 2 months ago
Themes & Styling · by Ian, 2 months ago
3 92 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 454 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 47 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 127 3 months ago