CSS to remove sidebar in future posts
-
Hello, i have about 10.000 pictures online with the width of 710 pixel. In this forum i read CSS to remove the sidebar. If i try this, photos are 710 pixel wide, but text in posts becomes full width. I do not like it. So i want to use hiding the sidebar only in future posts. This is possible with pages like here. Can i use full width in future post with CSS? Perhaps there is theme with which I can adjust the width of Posts differently. Thank you and greetings from Munich, Josef
The blog I need help with is: (visible only to logged in users)
-
Hi Josef,
I don’t think it’s possible to do it for all future posts and at the same time, ignore all the previous ones. CSS can either be targeted to specific posts manually, or to all the posts (including future/past).
i read CSS to remove the sidebar. If i try this, photos are 710 pixel wide, but text in posts becomes full width. I do not like it.
I assume along with text, you want the images to become full-width as well. If yes, the following code will solve it:
#tertiary { display: none; } body.content-right #primary { float: right; width: 100%; } .entry-content img { width: 100%; }The downside is, as the inserted images are only 710 pixels wide, they become a bit blurry when they are stretched to full-width of the screen.
Perhaps there is theme with which I can adjust the width of Posts differently.
As far as I’m aware, no theme offers an option to change post widths. It has to be done via CSS.
Let me know if you have any more questions! :)
-
Thank you ethis, the outspoken theme has the option to hide the sidebar. Then the pictures are 710 Pixel and the text is full width with 1112 Pixel. Increasing the images does not make sense. The wider text does not look good. Perhaps there is CSS to fix text in posts to 710 Pixel or 64 %.
-
Correct, I thought you wanted the text and images both to be full-width.
Let’s only hide the sidebar then. The following code will do it, and also keep the text/content area width to the default 730 pixels:
#tertiary { display: none; }This default text area width can be changed using this code:
body.content-right #primary { width: 710px; } -
Thank you ethis, but if i use the first, there is an empty column in the gridview of the home. With the second, the page with 1112 fotos also shrinks to 710. I need a code for full width with images were 710 or 1112 pixel wide, but the border of the text is at 710.
-
Hmm, the code with #tertiary shouldn’t be applied to your home page, if it continues to do so, add .single at the start like this:
.single #tertiary { display: none; }With the second, the page with 1112 fotos also shrinks to 710. I need a code for full width with images were 710 or 1112 pixel wide, but the border of the text is at 710.
If I’m getting it right, you want only the text on posts to be limited to 710px width. Images, whether 710px or 1112px, should retain their original width? Can you clarify please?
What I said above, can be achieved using this:
.single .entry-content { width: 710px; } .single .entry-content img { max-width: 1112px; }Now the text on posts will have 710px width. Images will not be affected. If you still want to limit the width of images, in the above code below max-width, add width: 800px.
If it still isn’t right, please post a link to an example post and explain what changes you’d like on that.
-
Dear Ehtisham, i think, outspoken with the grid-page as home does not like any other code for viewing und hiding the sidebar. The second solution is ok, but what happens, if i go to another theme. My solution is to edit div-container with the width for all former content. Than i am free for the future. My background is, that i use a new 4k-Monitor and i want to increase image resolution, but not text. Now i return to the content of new posts and will finish these experiments. I am working with screen shots. 4k allows me to cut and upload files with 1600 Pixel as one part of the double side of my photo books. Responsivity shrinks it, but in future themes i can show full width. Thank you very much and greetings to you in Peshawar, Josef
-
The second solution is ok, but what happens, if i go to another theme.
Yes, and that would require editing the whole thing again. :)
Thank you, Josef. You got a nice blog and the pictures are truly amazing. :)
- The topic ‘CSS to remove sidebar in future posts’ is closed to new replies.