Site logo

Archived topic

Change background color of comment section

3 replies · Started by Joshua on May 12, 2020

Viewing posts 1–4 of 4

Hi!

I'm trying to change the background color of only the comment section on my posts. I've gotten halfway there by using the code from this post: https://generatepress.com/forums/topic/changing-color-of-comment-section/

However, if you look at the comment section currently, you will see that the color does not expand full width: https://joshuamayo.com/start-blog/#comment

I've got the comments.php file in my child theme because I've been making minor edits to it, is there something I can add in there perhaps to make the color full width? Or some CSS?

As always, thank you!

Hi David,

That was exactly what I needed. Thank you so much!

For any Google searchers in the future I used this CSS:

#comments {
	max-width: 1200px;
	margin: 0 auto;
}

You can change the max-width to whatever you want. The "margin: 0 auto;" is what centers the comment section on your page.

Thanks again for pointing me in the right direction, David! You rock.

Happy to be of help!

This archived topic is closed to new replies.