Tagged: x
-
AuthorPosts
-
June 6, 2016 at 12:02 pm #1028342
TrankuilityParticipantHello,
I’m trying to decrease the time it takes to load pages when viewed on mobile. So I’d like to prevent the sidebar from rendering on mobile. I do not want to just make it invisible, I want to block it completely. How do I do that?
June 6, 2016 at 2:46 pm #1028579
RahulModeratorHey There,
Let’s try adding this custom CSS :
@media ( max-width: 979px) { .x-container .x-sidebar.left { display: none; } .x-main { float: none; width: 100%; } }Hope it helps, Cheers!
June 8, 2016 at 11:37 am #1032203
TrankuilityParticipantDoes that prevent it from rendering on Tablets too? I only want to prevent the render on mobile.
June 8, 2016 at 4:36 pm #1032709
DarshanaModeratorHi there,
Try changing the device width of 979px from the above code to 480px.
Hope that helps.
August 27, 2016 at 12:23 am #1149304
TrankuilityParticipantHello,
I finally got around to trying this. I tried both codes and cleared cache, but the sidebar still showed when viewed on mobile. Once you scroll down past the article content, it then shows the sidebar content.
Also, I don’t want the Homepage to be affected. I DO want the Homepage to continue showing the sidebar content on mobile. I want to prevent the sidebar content from showing on posts only.
I removed the code for now. What should I do next?
August 27, 2016 at 12:23 am #1149305
TrankuilityParticipantThis reply has been marked as private.August 27, 2016 at 1:50 am #1149375
LelyModeratorHello There,
Upon checking, the sidebar is on the right but then previous CSS is pertaining to sidebar on the left. Please try the following CSS:
@media ( max-width: 480px) { body:not(.home) .x-container .x-sidebar.right { display: none; } body:not(.home) .x-main { float: none; width: 100%; } }Hope this helps.
August 27, 2016 at 7:48 pm #1150078
TrankuilityParticipantThat worked perfectly, thank you.
August 28, 2016 at 12:29 am #1150192
LelyModeratorYou’re welcome!
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1028342 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
