Skip to main content
  • X Twitter
  • youtube
Home
Drupal 4U
Built for AI. Powered by Drupal.
  • Home
  • Showcases
  • Services
  • Blog
  • About
  • Contact

Breadcrumb

  1. Home
  2. HowTos
  3. How to make CSS modifications the proper way in Drupal 7

How to make CSS modifications the proper way in Drupal 7

HowTos
June 15, 2013
Profile picture for user drupal
By drupal
  • facebook-f
  • twitter
  • envelope
  • print
17

If you make CSS modifications in the style.css, they will be overwritten if you install a new version of a theme. To avoid such problems it is recommended to make modifications in an alternative .css file. The following instructions show you how you can prepare your theme to do so.

Solution
Creation of local CSS file

Creation of local CSS file

Open a (text)editor, create a new file and save it as .css (in our example local.css) in the root directory of your theme (sites/all/themes/themename).

Activation of local CSS file in theme.info

Activation of local CSS file in theme.info

Use a (text)editor to open the theme .info file (sites/all/themes/themename/themename.info). Add the following line after the last line ending with.css:

stylesheets[all][] = local.css
Drupal "Clear all caches"

Clear cached data

Go to Configuration > Development > Performance and "Clear all caches".

Drupal CSS
Css

Read more articles

Newer
How to disable the breadcrumb or menu trail using Drupal 7?
Older
Drupal Views: More link" is not showing/displaying. How to solve the problem?
  • Log in to post comments
Profile picture for user drupal
drupal
17
1
min read
A- A+
  • facebook-f
  • twitter
  • envelope
  • print

Contact Us

Get in touch for questions and our Drupal development, design and optimization services.

Contact Us

We aim to reply the latest within 48h.

Drupal 4U: Built for AI. Powered by Drupal.

We are a group of Drupal designers, developers and webmasters. We are Drupal experts! We provide comprehensive services that go beyond traditional web development, focusing on how AI understands, interprets, and cites your content. With our deep expertise in Drupal's architecture, we build the intelligent core of your digital presence, ensuring your brand remains authoritative and visible in a world where AI is the primary gatekeeper of information. Partner with us and let's future-proof your digital strategy together.

  • X Twitter
  • youtube

Drupal Services

  • Drupal Web Design
  • Drupal Development
  • Drupal SEO
  • Drupal GEO
  • Drupal Migration

Drupal 4U

  • Services
  • Showcases
  • Blog
  • About

Drupal Links

  • Official Drupal Website
  • Drupal Answers
  • Gaivas Themes Drupal 11
  • More Than Themes
  • Theme Forest
  • DXPR: Drupal for Marketers
2012 - 2025, Drupal 4U

Footer menu

  • Contact
Home
Drupal 4U
Built for AI. Powered by Drupal.
  • Home
  • Showcases
  • Services
  • Blog
  • About
  • Contact
Clear keys input element