0

I am new to Joomla. I am trying to customize the Article title. As per my understanding the title is using Header tag h2, now this is same across all the Articles displayed on the site. So basically if I change the header tag for 1 it changes all. I have an article with Title ASK YOUR QUESTIONS Now I want to add a background to this specific title only without changing the others. Please let me know how can I achieve this?

1

You can add a class to an article by going to its menu item, selecting Page Display and entering the class name under Page Class.

If you enter the name "test", the class name will be of the format "item-pagetest". Note that this class appears around the article rather than the whole page, though your H2 tag is most likely going to be within it unless you have an elaborate template.

You can then style the H2 tag with CSS along the lines of:

.item-pagetest h2{
   color:#f00;
}
  • Richard B : maybe you can precise where to put these lines. I would suggest user.css if using protostar. Go to Extensions -> Templates, then Templates (on the left), -> Protostar Details and Files -> CSS -> New File, click CSS again just in case. Then choose CSS in the dropdown menu Select File Type and choose user.css as the file name. The file will be automatically loaded.Put your CSS here. – jcm69 Jul 6 '17 at 20:38
  • This will only work if the Article "ASK YOUR QUESTIONS" is linked to by a menu item. I'm still in the habit of adding a space in front of the class name so any styling linked to the default page class is not affected: – BodgeIT Aug 4 '17 at 12:49
0

i think you just need to add a special class for this title and style for this class. It's enough for your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.