- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
How to create CSS rules for specific page in WordPress, Joomla and Drupal
October 8, 2012
Sometimes it is very important to add class unique for only page but it is impossible without adding unique identifier.
In this tutorial you will learn the way to create and use specific CSS class/id to alter specific page for WordPress, Drupal and Joomla.
-
The first CMS we will inspect is Drupal
- Open Drupal admin panel and go to “Structure” menu on the top and the select “Pages”
- Locate the page you need to edit and press “edit” button on the right:
- Update it by clicking the option you need and then “Edit” button on the right – you can see it on previous screenshot.
- Click “General” tab under “Variants” menu on the left:
- Type your new class in “Add body CSS classes” field, then press “Update” and “Save” buttons at the bottom to apply:
- Now you can check your website with Firebug and make sure you have new unique identifier applied specifically for that page:
-
The next we will use Joomla and explain the way to add unique page ID.
- Open Joomla admin panel and go to menu menager, then go to menu you use to open the page – regularly it is “Main menu” and click the button, for example if you need to edit “Contact us” page, then you need to open “Contact us” button.
- When you are in a specific menu button, press “Page Display Options” tab on the right panel:
- You need to add page class value, same as for Drupal you’ve just seen
- Press “Save” button and it will be applied to your page. Now when you visit it new ID will be added.
-
The last CMS we inspect is WordPress
-
Now you know how to assign unique identifier so you can use it to set unqie style, gor example:
.your_ID h2 {display:none;}
It will hide all H2 instances for page with ID “your_ID”
Thank you for watching our video tutorials. Please contact us if you have any issues in editing your template. Good Luck!!!
Feel free to check the detailed video tutorial below:
How to create CSS rules for specific page in WordPress, Joomla and Drupal