Remove sidebar and black space above blog
-
Hi there!
Today I activated a new theme for my wordpress.com blog: Canard. Lovin’ it!But, I would like to remove the sidebar on the page/post-sites, AND I would like to decrease the blanc space right above my header.
I’ve tried my old CSS but is does not seem to work. Does any of you have any ideas about the CSS I should use?It would be a great help! Thank you very much!
greetz
KarinThe blog I need help with is: (visible only to logged in users)
-
Karin, if you want the sidebar gone (the one with search and category widgets), I’d say a better option would be to remove all the widgets from it and it won’t show anymore.
To do that, go to Dashboard > Customize > Widgets > Sidebar.
And to modify that blank space, use this code:
.site-branding { margin-top: -20px; } .search-navigation { margin-top: 15px; }Adjust .site-branding for header position and .search-navigation for menu.
-
Thanks for your reply, Ehtis. But I would just have it removed for the content page, where the posts are. For the homepage, I wanna keep it.
Do I need an extra code?
Thank you!
-
This will hide the sidebar from all posts/pages:
.single .widget-area { display: none; } .single #main { width: 960px; } .page .widget-area { display: none; } .page #main { width: 960px; }.single refers to individual posts, .page is self-explanatory. :)
-
Sidebar is gone, Ehtis! When I’m changin the CSS the page looks exactly like I want, but when I open a post afterward (like this: http://karinkoolen.com/2015/02/16/wat-mannen-kunnen-leren-van-50-tinten-grijs/) the content box is still very small. How can I widen it, so it will fit the middle and the right part of the screen? I’ve tried a few things, but can’t manage it…
Thank you!
-
-
Forgot to remove the border! Add the following below the previous code:
.single #main, .page #main{ border:none; } .single .entry-content, .page .entry-content{ width: 960px; margin-left: -10px; }You can position the content and adjust its width in .entry-content.
-
Thank you so much! I’ve changed the margins a bit and now it’s exactly how I had in mind – so I can go to sleep ;-)
ciao!
-
-
Hi there,
I’m back!The CSS as was mentioned above worked really well on my laptop, but… when I opened my site on iPhone or tablet, all the content appeared weird and I had to scroll left and right to see all the content. Is there a way using this code – or another code – that will fit iphone and tablet as well…
Thank you so much!
-
Hi again!
We can limit the CSS changes to desktop/laptop sized screens only, that way appearance won’t be disturbed on mobile or tablet browsers.
I’m going to wrap all of the above code in this @media query:
@media screen and (min-width: 768px) { //insert all code here which affects mobile }Here’s the final version:
@media screen and (min-width: 768px) { .single .widget-area { display: none; } .single #main { width: 960px; } .page .widget-area { display: none; } .page #main { width: 960px; } .single #main, .page #main{ border:none; } .single .entry-content, .page .entry-content{ width: 960px; margin-left: -10px; } } -
-
-
- The topic ‘Remove sidebar and black space above blog’ is closed to new replies.