3

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
  • 1
    Can you give us a URL for the site?
    – Adjam
    Commented Mar 19, 2012 at 18:39

3 Answers 3

5

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.

9
  • 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
    Commented Mar 19, 2012 at 18:35
  • Have you checked for CSS in inline style elements?
    – Adjam
    Commented Mar 19, 2012 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
    Commented Mar 19, 2012 at 18:41
  • No inline styles and no @import
    – user10560
    Commented Mar 19, 2012 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
    Commented Mar 19, 2012 at 18:50
2

CSS Rules can also be assigned through JavaScript/jQuery.

1
  • We pointed that out in the comments to the answer
    – Anagio
    Commented Mar 20, 2012 at 9:36
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.