Home > Web Front-end > CSS Tutorial > Detailed explanation of the steps to add custom CSS to a Drupal 7 website

Detailed explanation of the steps to add custom CSS to a Drupal 7 website

高洛峰
Release: 2017-03-27 09:36:08
Original
1710 people have browsed it

When we visit chat rooms or forums, we often encounter people asking how to add custom CSS to a Drupal website - generally speaking, it is best to add it through a Drupal theme. However, in some cases, other methods have to be considered due to environmental restrictions or because the website administrator does not have access to the theme files.

Today, this article will introduce how to use the CSS Injector module to add custom CSS to the Drupal 7 website.

 (Annotation: Both CSS Injector and CSS Editor can be used as temporary CSS addition and adjustment methods, but ultimately they should be added through the theme CSS file)

Step one: Install and enable the CSS Injector module

Download this module from the CSS Injector project page

详解为Drupal 7网站添加自定义CSS的步骤

##Visit the module management page and find CSS Injector module, click the check box to select

详解为Drupal 7网站添加自定义CSS的步骤##, scroll down the page to the bottom, and click save to enable CSS Injector

详解为Drupal 7网站添加自定义CSS的步骤Step 2: Add custom CSS

After enabling the CSS Injector module, enter the "Configuration > CSS Injector" page to start using CSS Injector. Click the Create a new rule link to start adding a new CSS rule.

详解为Drupal 7网站添加自定义CSS的步骤After filling in the title and CSS code of the CSS rules, specify the theme to use these CSS through the settings in the Themes to show on section

详解为Drupal 7网站添加自定义CSS的步骤By default, the added CSS will take effect on all pages. You can also select the page where the CSS will take effect as needed

详解为Drupal 7网站添加自定义CSS的步骤 After filling in all the content, click "Save" "That's it.

The above is the detailed content of Detailed explanation of the steps to add custom CSS to a Drupal 7 website. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template