Hello.

I can not figure out what the reason is, but there is some CMS that neither has a code (mine) nor a name (I just don’t know), I cannot tell, it was installed normally, the base is correct, everything works, except for styles.

For example, take FireBug, it shows that all .css files are loaded, shows their contents, but does not apply them to any of the elements.

Almost the same canoe is created with the Opera, though it can still load some styles, and some remain unheeded. They say that on other servers, for example, Denver, works, but on my Apache, does not want. And the most mysterious for me is that simply the styles do not apply, there is access, there is content.

Connection of files is also true, all of the following:

<link rel="stylesheet" href="http://link/template/default.css" type="text/css" /> 

Please tell me, for what reason can this happen? I apologize for such a vague description.

  • are styles added to head? and + a couple of lines from the styles would be useful (there might be a jumble of classes or left tags are clearly indicated, such as div.notice {} and <span class="notice"> ) In general, you can save as a "web page, completely" and lay out Something will be faster. - Sh4dow
  • Hmm, thank you, @ Sh4dow, an idea struck me, and now the question can migrate to the RutCode for now it refers to the incorrect presentation of styles by the server, instead of Content-Type: text/css server gives everything to Content-Type: text/plain - Dex
  • By the way, is it only on cms or even on the whole server? In the first case, this is some kind of dumb anomaly. in the second it is surprising that only now it is noticed. - Sh4dow

1 answer 1

.htaccess / httpd.conf

 AddType text/css .css 

=)

  • This is only on this CMS. Here I sit looking where. For this type I roll in mime.types attached to the server. - Dex
  • See .htaccess, there might be something like rewriterule ^ (. *) $ Index.php? P = $ 1 [L] or just interception of styles. You can also search the files by the queries "text / plain", "header (" and the like. And just in case - Sh4dow
  • In fact, you are right, most likely this was the case, but my mime.types was somehow clumsy or I don’t even know what it was. But now it works, thanks. - Dex
  • Excellent) This, of course, is a crutch, but it seems to be sturdy, it should stand) - Sh4dow
  • one
    @ Sh4dow, you apparently did not understand, it was, rather, my mistake, some kind of left-wing mime.types plugged in Apache, and this strange crap spilled out. - Dex