Support #2536

External CSS file not taking effect when deployed with fcgi

Added by 太极美术工程狮 狮长 over 9 years ago. Updated over 9 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


Please take a look at the attached project.

I used a simple css file which set the width of buttons to be 500px.

I referenced the css file by "useStyleSheet("QueueMateWeb.css");" in the constructor of my WApplication subclass.

When linked against wthttp, the resulting button width is 500px as expected.

When linked against wtfcgi and deployed with apache , the application ran normally,but the external css seemed not "applied" by the browser.

I put the css file and the binary .wt file into the root directory of apache.

Debugging using firebug,I can see that QueueMateWeb.css referenced by the page, and I can "open the css file in new tab" and see the content of the css file,but it just not "applied".

The networking tab of firebug also showed that the css file requested successfully by firefox.

Files (11.7 KB) A simple project with external css file 太极美术工程狮 狮长, 01/05/2014 08:54 AM

Updated by Wim Dumon over 9 years ago

Is there a difference in the response headers for the CSS file? Is the mime type for the CSS files correct?




Updated by 太极美术工程狮 狮长 over 9 years ago

I will check that later.

There was a 404 error of the css file at the beginning because I forgot to deploy the css file before visiting the page . Then I copied the css file there and refreshed and got this "not applied" behavior.

Also available in: Atom PDF