Remove blog sidebar from mobile - CSS not working

Hi, I’m trying to remove the blog sidebar from mobile/iPad, etc. and have added the below CSS to the Global CSS in the Theme Options:

}
@media(max-width:979px){
.x-bar-widget-area .widget.widget_nav_menu {
display: none;
}
}

…but it’s not working. Any idea where I’m going wrong?

Thank you in advance!

Hi Beate,

Thank you for writing in, please update your custom CSS code to this.

@media(max-width:979px){
	.x-sidebar .widget.widget_nav_menu {
		display: none;
	}
}

If that did not still work, please check all your custom CSS here. You might have a syntax error somewhere on your custom CSS that block to hide a sidebar gets affected.

Hope it helps,
Cheers!

Hi Beate,

You can update your code to this one:

@media(max-width:979px){
	.x-sidebar .widget.widget_nav_menu {
		display: none !important;
	}
}

If the code still doesn’t work, please provide us your website URL so that we can check what’s going on.

Thank you.

Hi Beate,

You can update your code to this one:

@media(max-width:979px){
	.x-sidebar .widget.widget_nav_menu {
		display: none !important;
	}
}

If the code still doesn’t work, please provide us your website URL so that we can check what’s going on.

Thank you.

Still no joy, unfortunately. See below for our login details.

Thank you so much for helping!

Hi @boera,

The sample code is to make invisible the Nav Menu widget only, to remove the sidebar completely you need to modify the custom CSS code. Please find the following custom CSS code.

@media(max-width:979px)
{
    .x-sidebar
    {
        display: none;
    }
}

Please remember that the above code will work if copied as it is and doesn’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We really do not provide support for custom codes that means we can’t fix it in case it conflicts with something on your site nor will we enhance it.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.