Owaiz Yusufi Owaiz Yusufi - 1 month ago 15
CSS Question

css not working in wamp server

I have a problem with external css. When I have creating my project using html and css the css is working fine but when for some reasons I have change this

#LoadModule rewrite_module modules/mod_rewrite.so

in httpd.conf file in apache

to this

LoadModule rewrite_module modules/mod_rewrite.so

my all the css are not working properly and one more thing is that when I have checked the console

Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost/E-commerce/styles/style.css".

anybody tell me that this is the main reason or not


A Simple description to whats happening during the process is that browser Send HTTP Request and receive a response to that request from the server to two contains headers.in this case your server is making stylesheet come with wrong content-type try first to inspect element using dev tools in browser and investigate the response from server . i believe if you create new htaccess with the following content :

AddType text/css .css 

this will server to send it as stylesheet