Article Specific Padding?

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
Clawlessic
Joomla! Intern
Joomla! Intern
Posts: 93
Joined: Fri Oct 05, 2012 8:02 am

Article Specific Padding?

Post by Clawlessic » Wed Dec 05, 2012 10:35 am

Hey there,

Is it possible to have padding on specific articles? So i can say in my template css or wherever that these articles have a padding of 25px on the left and the right? I dont want my postcontent to have a padding of 25px because then it will mess up some things.

I also rather not want to do it in each article because if someone else replaces the content for new content it will be gone aswell.

I have the tool firebug but cant really find where to add the code.

http://klanten-visual.nl/bvdijk/aanmelden

The main text on top needs padding. But when you change it the other pages get padding aswell. (which will mess up everything, just like i said :D)

Hope anyone knows!

Greetings Martijn

Clawlessic
Joomla! Intern
Joomla! Intern
Posts: 93
Joined: Fri Oct 05, 2012 8:02 am

Re: Article Specific Padding?

Post by Clawlessic » Wed Dec 05, 2012 12:55 pm

Is this something you will have to do in the index.php?
As its about a particular position in the template. (Position-12).

cf1237
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 161
Joined: Thu Mar 19, 2009 1:48 pm

Re: Article Specific Padding?

Post by cf1237 » Wed Dec 05, 2012 4:03 pm

If the single article is set up so that it is a menu item, just assign it a Page Class in Menu Item/Page Display Options. Joomla will append this class to the article when displayed. This gives the article a unique class name you can address with CSS.

If I understand your question, this is a simple matter of finding the specific element information for the article at hand (use Firefox Web Developer extension, then choose Information/Display Element Information.) Examine the article and get the class. Then just add whatever CSS code you need.

Clawlessic
Joomla! Intern
Joomla! Intern
Posts: 93
Joined: Fri Oct 05, 2012 8:02 am

Re: Article Specific Padding?

Post by Clawlessic » Thu Dec 06, 2012 9:00 am

cf1237 wrote:If the single article is set up so that it is a menu item, just assign it a Page Class in Menu Item/Page Display Options. Joomla will append this class to the article when displayed. This gives the article a unique class name you can address with CSS.
it was a bit of a search but i found out how it works :). And it was what i was looking for! Thanks a lot!

Greetings Martijn


Locked

Return to “General Questions/New to Joomla! 2.5”