Site logo

Archived topic

Apply CSS only to Default 404 Page

3 replies · Started by Jackson on June 1, 2022

Viewing posts 1–4 of 4

I am not using any Site Library Content. The Container width is 1200px. All contents stay within the 1200px. But the 404 page displays away from the container ( 15px to the left), hope you can correct that in future updates.
My questions is, how can I apply CSS which should apply ONLY for the error404 page. I added the following, it doesn't work.

body.error404 .separate-containers.both-right .site-main, .separate-containers.right-sidebar .site-main {
	margin-left: 15px;
}

(The code affects the whole site)
Thanks.

I shared the URL of the site Leo.
BTW, I just found that it happens to only one URL , wp-sitemap.xml (wp default sitemap)
Rest 404 errors are within container.

Currently my site is disallowed from indexing, and that is the reason wp-sitemap.xml shows 404.
However if I allow indexing, the issue will be solved.
Not an issue though. I will close this ticket. Thanks

No problem :)

This archived topic is closed to new replies.