I am attempting to locate some CSS rules but they do not exist in the index.php header tag, nor in the only CSS file which the header references.

Where else could they be?

  • 1
    Can you give us a URL for the site? – Adjam Mar 19 '12 at 18:39

CSS can be located directly in your HTML files within the <head> tag wrapped in <style> tags. You can also style elements inline such as <div style="width:100px;"></div>

CSS files can import other CSS files via @import. It is also possible that styles are changed or added with Javascript.

| improve this answer | |
  • Thanks, there is no CSS within the head tag. There is an external stylesheet, which is referenced in the head tag. But it does not contain a boatload of CSS which the site employs, but I cannot find. – user10560 Mar 19 '12 at 18:35
  • Have you checked for CSS in inline style elements? – Adjam Mar 19 '12 at 18:39
  • CSS files can also be imported using the @import function within .css files. It's also possibly that inline styles are set using javascript but the majority of the styles would not have this – Anagio Mar 19 '12 at 18:41
  • No inline styles and no @import – user10560 Mar 19 '12 at 18:49
  • some inline for minor JS but otherwise I just can't find a lot of CSS. I must be missing something obvious – user10560 Mar 19 '12 at 18:50

CSS Rules can also be assigned through JavaScript/jQuery.

| improve this answer | |
  • We pointed that out in the comments to the answer – Anagio Mar 20 '12 at 9:36

You can import a stylesheet directly through .htaccess, but the is only supported by Firefox and Opera at the moment.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy