Full width in case no sidebar [Twenty Sixteen]
-
Hi there,
I want to create some pages with a sidebar and some pages without on my website https://hoejehetziet.nl
Therefore a created a page-template (a copy of page.php, which I called no-sidebar.php) and put this in my Child Theme. I excluded the ‘get_sitebar’ from in this template.
The problem is: when I use this template it works, but the page content is not displayed at full width. There’s simply a white area instead of the sidebar.
I tried to change this in the CSS file (using a Childtheme), but I didn’t succeed. I tried to add the following code:‘.no-sidebar .content-area {
‘ float: none;
‘ margin: 0;
‘ width: 100%;
‘ }
‘This didn’t work. The only thing that works is the following code:
‘.content-area {
‘ float: none;
‘ margin: 0;
‘ width: 100%;
‘ }
‘
But this results in a full width on all pages, so there is no sidebar visible at any page (even those who do contain a sidebar).I’ve very little experience with php and webdevelopment, but hopefully anyone can help me with solving this issue.
- The topic ‘Full width in case no sidebar [Twenty Sixteen]’ is closed to new replies.