Customized CSS doesn't work


#1

I made some changes in the Cloudflare error pages’ CSS file, but it doesn’t work in Preview mode or even it is published with any error page types. I host everyting from my server (HTML, CSS and pictures). If I try it locally, from my hard drive, it works well with the Preview mode’s HTML code.
But I can’t use this because the HTML code is re-generated every time based on token of the error code. So, when I paste the error code into the HTML file and the system generate the code from this, CSS rules aren’t applied. They are changed to some weird “dummy” inline codes in the HTML and text appears in raw style.

I read the documentation and followed the instructions, but it doesn’t help.

What did I do wrong?


#2

Hey @benjamin.zentai,

Could you provide me with the URL you configured in your portal or the name of your domain so I can check what’s going wrong?


#3

Hi @stephane,

Here is the URL, where you can find the HTML file: https://static.netpincer.hu/content/hu/ad/ujapp2018/cloudflare_test/cloudflare_test.html

I also used this to make the Preview on Cloudflare. Now, it’s contains the default preview’s HTML, where the CSS works and 1 error code token, which (in Cloudflare preview mode) generates the same code as the deafult preview, but here, CSS isn’t working.

I also uploaded every other element to my storage.


#4

Tested on my end and I see the page rendered and using actually your CSS: https://ftp.justalittlebyte.ovh/

My custom page based on yours: https://www.justalittlebyte.ovh/error/1000/cloudflare_test.html


#5

Thank you very much to try it at your side. It seems good, but why it doesn’t work in Cloudflare’s Preview mode? Should I try to preview it on my website as a test page as you did?


#6

Hey @benjamin.zentai,

I see also that you’re an Enterprise customer with us, I suggest you work on this with your dedicated Solutions Engineer and Success Manager, what do you think? You’ll get a way better support (i’m part of this team but not dedicated to your account, though)

The screenshot I sent you is generated through the preview menu, so for me, it’s working so far :slight_smile:


#7

Okay, I’ll get in touch with our Support contact. But thank you for testing my code! :slight_smile: