Search code examples
drupal-7

Can't change css files in Drupal 7?


I need to alter another developer's theme, currently installed on Drupal 7. I need to change simple css, but cannot get the css to update. I have changed literally every reference to a particular #id in the css throughout the entire codebase, yet the chrome web inspector shows me those files as if they had never been changed.

Things I've tried:

  • Clearing the cache
  • Disabling/re-enabling the theme
  • Restarting apache
  • Violently shaking fists

Yet I cannot, for the life of me, get that css file to change in the downloaded file.


Solution

  • Try this:

    1. Check the code of the HTML of your Drupal page.
    2. Locate your CSS file in the code and open it in the browser.
    3. Press F5 to refresh your browser cache.
    4. Check if the file reflects your changes.

    If not, you are editing the wrong file.

    Remember that clearing CSS caches will append a different string to every CSS every time, so, if you are editing the correct file it must reflect the changes.

    In the worst case you have issues with CSS :/