Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to edit htm/css in drupal theme?

Tags:

php

themes

drupal

I have a Drupal theme, and I want to edit its HTML/CSS according to my needs. Can anybody tell me how I can change it? (Specific file name?)

I have tried to change page.tpl.php but couldn't get any output.

like image 335
naCheex Avatar asked Nov 26 '13 00:11

naCheex


People also ask

How do I change my Drupal theme?

Using the top menu area, click on the Appearance option. This will bring up the themes page. You will see all enabled themes in the top portion of the screen with the current theme at the very top. To enable a different theme, simply scroll down to theme of your choice and click on the link labeled Set Default.

Does Drupal use CSS?

In Drupal, CSS stylesheets (CSS) and JavaScript (JS) are loaded through the same system for modules and themes as asset libraries. Drupal uses a high-level principle: assets (CSS or JS) are still only loaded if you tell Drupal it should load them.


1 Answers

The file depends on what part of the page you're attempting to update. Here's a great visual of the file structure when it comes to theming: https://drupal.org/node/171194

You'll be editing the html.tpl.php, page.tpl.php, and style.css files (or whatever you're calling your main CSS file). Very important - once you make your changes, you need to clear the cache within Drupal so it recognizes the changes. To do this go to "admin/config/development/performance".

like image 200
cfox Avatar answered Sep 20 '22 19:09

cfox