Site logo

Archived topic

"Make page full-width" also makes comment section and TOC full width

3 replies · Started by Knuth Becker on July 26, 2021

Viewing posts 1–4 of 4

Hi

I choose "Make page full-width" to a post to be able to make certain containers full width. However, this also makes the comment section as well as the table of content (I'm using Easy Table of Contents) full width. Is it possible to make these two things contained at 900px? Screenshots and URL attached.

Hi there,

try adding this CSS:

.comments-area,
.ez-toc-wrap {
    max-width: 900px;
    padding: 0 40px;
    margin: auto;
}

Then i assume you hooked in the ToC shortcode. If so then add a

wrapper around the shortcode :

<div class="ez-toc-wrap">Shortcode i here</div>

Okay, thanks. This is not possible with the hooks or elements?

No - and if it were it would just be applying similar CSS.
Do you need to selectively apply this ?

eg. this CSS would only apply to full-width-content pages/posts:

.full-width-content .comments-area,
.full-width-content .ez-toc-wrap {
    max-width: 900px;
    padding: 0 40px;
    margin: auto;
}

Let me know

This archived topic is closed to new replies.