CSS not working

Hi all,

I have a strange behaviour on my website…

https://berelmarozov.000webhostapp.com/canteen/

I have a style.css file that loads correctly, but the button.css file doesnt load…

image <—How it should look
image <— How it looks

originally my console said “refused to apply style from because its mime type (‘text/html’) is not a supported stylesheet… strict mime is enabled”… i tried accessing the css file from the browser and it didnt show up, so i saved it as UTF-8 and the error went away, and it comes up in the browser, but its not applying the styles :(.

Its working just fine on my xampp localhost…

Thanks for your help :)!

Console/inspect element of Chrome says something could be wrong with

https://berelmarozov.000webhostapp.com/canteen/holder.js/100px180/

Try using console/developer tools?

The strict mime enabled error is sometimes a completely false positive for a file that 404’s also

Ha! i have a plugin in VScode to quickly generate bootstrap elements with intellisense, and it put a placeholder image in a .card element… I dont have a holder.js file, and i removed it from the html… thank you.

But the css still isnt working, even though the link https://berel.me/canteen/button.css does bring it up! doesnt seem like a 404… especially that console doesnt have the MIME problem anymore (after i saved as UTF-8…).

Any idea?
Thanks again!

Try

   <!-- Local stylesheets-->
    <link rel="stylesheet" href="style.css">
    <!-- CSS for toggle button-->
   <link rel="stylesheet" href="button.css">

Instead?

1 Like

Yeah just tested that in CodePen and the button shows up :smiley:

YES!

Thanks a million!

I had originally put the rel attribute on… then took it out to test… then saved as UTF-8… then forgot to put back the rel attr… +1 if you followed that :slight_smile:

i appreciate your time

1 Like

This topic was automatically closed after 20 hours. New replies are no longer allowed.