Skip to main content

Post categories

  • Drupal Tips & Tricks
  • Drupal Howtos
  • Drupal Themes
  • X Twitter
  • youtube
Home
Drupal 4U
Drupal Development, Drupal Web Design, Drupal SEO
  • Home
  • Showcases
  • Services
  • Blog
  • Themes
  • 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
15

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
15
1
min read
A- A+
  • facebook-f
  • twitter
  • envelope
  • print

Contact Drupal 4U

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

Contact Us

We aim to reply the latest within 48h.

About Drupal 4U

We are a group of Drupal designers, developers and webmasters and we launched this website to share our experience and knowledge with you. Drupal is a free software package that allows you to easily organize, manage and publish your content, with an endless variety of customization. Drupal is open source software maintained and developed by a very large community of developers and users.

  • X Twitter
  • youtube

Drupal Services

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

Drupal 4U

  • Services
  • Showcases
  • Themes
  • Blog
  • About

Drupal Links

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

Footer menu

  • Contact
Home
Drupal 4U
Drupal Development, Drupal Web Design, Drupal SEO
  • Home
  • Showcases
  • Services
  • Blog
  • Themes
  • About
  • Contact
Clear keys input element