XF 2.2 Hide sidebar on mobile

  • Thread starter Thread starter Deleted member 241496
  • Start date Start date
D

Deleted member 241496

Guest
Is there a way to hide the entire sidebar, rather than individual widgets on mobile?
 
Solution
The sidebar collapses to the bottom on narrower screens.

Do you want to remove it and all the content altogether?

If so, add this to the extra.less template:

Less:
@media (max-width: @xf-responsiveWide)
{
    .p-body-sidebar
    {
        display: none;
    }
}

That will remove it for screens narrower than 900px.

These are the default break points:
1634073317743.webp

You can substitute xf-responsiveWide for one of the others, or enter an actual value, e.g. 500px.
The sidebar collapses to the bottom on narrower screens.

Do you want to remove it and all the content altogether?

If so, add this to the extra.less template:

Less:
@media (max-width: @xf-responsiveWide)
{
    .p-body-sidebar
    {
        display: none;
    }
}

That will remove it for screens narrower than 900px.

These are the default break points:
1634073317743.webp

You can substitute xf-responsiveWide for one of the others, or enter an actual value, e.g. 500px.
 
Solution
Back
Top Bottom