how to apply custom css to 404 pages


  • Question

For 404 pages, I can't get a css style to apply to it and stay consistent. I try doing it through css injector and have it apply to only the 404 page, but doesn't work. The sloppy way is to apply it to all pages except my root menu pages and their children but it won't catch 404's below the menu level. Any ideas how to get it to work?


If you create a custom 404 node and set it via Configuration > Site information, you'll get a consistent class (such as "section-404") added to your <body>, which you can then style with global css via css injector.