404 Not Found page not styled properly

5 replies · opened Aug 8, 2021

PPaulAug 8, 2021

Hi SemiColonWeb,

Please refer to the two attached screenshots.

If I visit the 404.html page directly ( see https://coastmetalsolutions.com/new/404.html ), everything is proper; however, if I arrive at the 404 page by entering an invalid URL ( e.g. https://coastmetalsolutions.com/new/test ), the flex formatting is broken.

I couldn't figure it out in the styling.

Let me know if you can spot what I'm doing wrong.

Thanks!
Paul

SSemicolon WebSTAFFAug 9, 2021

Hello,

Since you are using a Rewrite URL: https://coastmetalsolutions.com/new/test/ , you will need to use Absolute URL for the Assets on your Website. Like: https://coastmetalsolutions.com/new/style.css instead of just style.css. This is applicable to all the Assets on your Page like CSS/JS/Images or any other Media.

This will definitely fix your issue. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

PPaulAug 9, 2021

Hi SemiColonWeb,

I'm sorry, I don't understand. What I mean is that any garbage link should go to the 404.html page... which it's doing, but the formatting is wrong (see screenshots). But when I directly visit the 404.html page, the formatting is fine.

Thanks in advance!
Paul

SSemicolon WebSTAFFAug 10, 2021

Hello,

Thanks for your Patience!

  1. Open the 404.html Page of your Website in the Text Editor.

  2. Find the following codes:
    [ch_pre]

  • [/ch_pre]

  1. The href="style.css" is a Relative URL and will take the URL according to the URL in the Address Bar. So when you are trying to load: https://coastmetalsolutions.com/new/test , it looks for https://coastmetalsolutions.com/new/test/style.css File which does not exist on your Servers, thus there are issues on your Page (check your Browser's Developer Console). So, to fix this use the following codes:
    [ch_pre]
  • [/ch_pre]

As the href="https://coastmetalsolutions.com/new/style.css" is an Absolute URL and will always load the style.css File from any Page using this URL. You will need to change all the Relative URLs on your Page (even for Images and JS Files) to Absolute URLs.

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

PS: This is not an Issue with Canvas Codes, but this is how Web works.

PPaulAug 11, 2021

Hi SemiColonWeb,

Thank you for the explanation-- I understand what you were saying now.

I'll get that working, and then apply at least 2 more updates you've done recently. ;-)

We really love this theme.

Regards,
Paul

SSemicolon WebSTAFFAug 11, 2021

Thanks for the Kind Words and Very Happy to Help! :)

Please do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard