-
nachink
Hello,
I am having an issue with the category posts being off center on the page. They do not align with the other things on the page and tweaking padding or margin of the container doesn’t seem to help. How can I make them center on the page? Thank you
-
Alvind
Hi there,
You are using WP’s latest posts block, it’s using ul tag, which comes with a default margin-left.
Try adding this CSS to set both left and margin to auto for the latest posts block.
.site-main ul.wp-block-latest-posts__list { margin-inline: auto !important; } -
nachink
Do I put this CSS onto the individual pages/posts or somewhere for the whole main site? Can you please explain where I would put it? Thank you
-
Hi there,
You can add CSS to customizer > addtional CSS. -
nachink
Ok, I put in the CSS but it still seems to be off.
-
nachink
It seems to have centered on desktop but on mobile now it skews to the left.
-
@media(max-width: 599px) { .site-main .wp-block-latest-posts li { margin: 0 !important; } } -
nachink
That makes the images stick together in desktop and have no margin on mobile?
-
I’ve updated the CSS, give it another try.
- You must be logged in to reply to this topic.