Home › Forums › Support › Exclude one page (home page) from CSS rule? This topic has 5 replies, 2 voices, and was last updated 3 years, 2 months ago by David. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts January 6, 2021 at 4:44 am #1607803 Emil Hi! I wanted the sidebar to not get smaller than 300px and got help to find this solution: @media (min-width: 769px) { #primary { width: calc(100% – 330px); } #right-sidebar { width: 330px; } } It works perfect! But the problem now is that I want the home page to be full width, without a sidebar. How can I exclude the homepage from this CSS code? Or can I do it some other way? January 6, 2021 at 6:17 am #1607883 DavidStaff Customer Support Hi there, you can change your CSS to exclude the home page: @media (min-width: 769px) { body:not(.home) #primary { width: calc(100% – 330px); } body:not(.home) #right-sidebar { width: 330px; } } January 6, 2021 at 6:31 am #1607906 Emil That code made the home page look good. But on all other pages with sidebar, the sidebar went down under the main content. Can you take a look at it, please? /Emil January 6, 2021 at 6:57 am #1608100 DavidStaff Customer Support Try manually retyping this line – looks some weird spacing character got copied over: width: calc(100% – 330px); January 6, 2021 at 7:02 am #1608110 Emil Great, that worked like a charm! Thank you! January 6, 2021 at 7:04 am #1608114 DavidStaff Customer Support Glad to hear that Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In