Home › Forums › Support › How to hide the sidebar only in mobile view This topic has 9 replies, 3 voices, and was last updated 3 years, 1 month ago by David. Viewing 10 posts - 1 through 10 (of 10 total) Author Posts July 10, 2018 at 5:12 am #620088 Zipeng I want to disable my right sidebar on the mobile view only. and show up at the desktop view. How can I do that? July 10, 2018 at 5:59 am #620112 DavidStaff Customer Support Hi there, you can use this CSS: @media (max-width: 768px) { #right-sidebar { display: none; } } March 15, 2021 at 4:42 am #1695687 ROHART Hi David, I want the same thing. I add the css code on my blog my-wildlife.com but it doesn’t work. Any idea why ? Gregory March 15, 2021 at 6:50 am #1696052 DavidStaff Customer Support Hi there, where are you adding the CSS ? March 16, 2021 at 8:00 am #1697583 ROHART Hi David, On the “additionnal css” menu (it’s a transmation of my french menu so the english name can be a little bit different) = > ../wp-admin/customize.php?url=https%3A%2F%2Fwww.my-wildlife.com%2Fparc-ornithologique-de-pont-de-gau%2F March 16, 2021 at 10:16 am #1697780 YingStaff Customer Support Hi there, As far as I can tell, the sidebar is gone on mobile. Have you cleared your browser cache? Let me know 🙂 March 17, 2021 at 12:32 am #1698353 ROHART Yes, I cleared the browser cache. On mobile, the sidebar is under the central part of my articles. You can check for example on the article https://www.my-wildlife.com/ou-faire-un-safari-au-kenya/ Gregory March 17, 2021 at 4:59 am #1698596 DavidStaff Customer Support Aah now i can see the CSS – the problem is this comment: // pas de sidebar en mode mobile Its an invalid comment for CSS and will break any code that comes after it. CSS comments have to be wrapped in /* */ So it should be: /* pas de sidebar en mode mobile */ March 17, 2021 at 5:37 am #1698626 ROHART Thanks David for your help. It works and I learned something today. March 17, 2021 at 7:06 am #1698959 DavidStaff Customer Support You’re welcome. As a note: // this comment is fine for PHP and Javascript Author Posts Viewing 10 posts - 1 through 10 (of 10 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In