Joomla! 1.5 Template Reference: Part 2

3 min read

Common Joomla! CSS

As you can see, via template overrides, you can pretty much define any CSS ids or classes you want. For those of you who are into creating and tweaking template overrides, unless you’re going to create a highly custom, private, not-for-the-public template, my recommendation is you continue to use Joomla’s general CSS ids and classes for component and module output as much as possible.

This is a good way to ensure your template is familiar to other Joomla! administrators, especially if you want to offer your template to the public or for commercial sale. It’s easy for them to look up and customize CSS rules rather than forcing them to discover all the new and interestingly-named CSS ids and classes you created. For those of us working with Joomla’s core output or the Beez template overrides (which attempts to use Joomla’s standard CSS), here is a list of some of the most common CSS ids and classes. Those of you familiar with Joomla! 1.0 template design will be pleased to find these haven’t really changed.

This list has been put together after a bit of research and a lot of experimentation with the Web Developer Toolbar CSS tools. It is probably not complete, but if you account for these items in your CSS rules, you’ll be pretty well covered for most Joomla! projects, and it will be easy to spot any ids or classes not covered here and add them to your CSS sheet.

The Joomla.org forum has a post with a fairly comprehensive list, most of which you’ll recognize here, so it’s definitely worth checking out: http://forum.joomla.org/viewtopic.php?t=125508.

Joomla! 1.5 CSS ids

#active_menu

This is generated by the type=”modules” include. Use it to style and control the currently selected main menu item.

#blockrandom

This is generated by the type=”component” include when you’re using the wrapper. This is the iFrame’s id.

#contact_email_copy

This is generated by the type=”component” include when you’re in the contact form page view. This is a field name id.

#contact_text

This is generated by the type=”component” include when you’re in the contact form page view. This is a field name id.

#emailForm

This is generated by the type=”component” include when you’re in the contact form page view. This is a field name id.

#mainlevel

This is generated by the type=”modules” include. Use it to style and control the main menu div holding each main menu item.

#mod_login_password

This is generated by the type=”modules” include. This is a field name id.

#mod_login_remember

This is generated by the type=”modules” include. This is a field name id.

#mod_login_username

This is generated by the type=”modules” include. This is a field name id.

#poll

This is generated by the type=”modules” include by the poll module. You can control the placement of the entire id with this.

#search_ordering

This is generated by the type=”component” include when you’re in the search form page view. This is a field name id.

#search_searchword

This is generated by the type=”component” include when you’re in the search form page view. This is a field name id.

#searchphraseall

This is generated by the type=”component” include when you’re in the search form page view. This is a field name id.

#searchphraseany

This is generated by the type=”component” include when you’re in the search form page view. This is a field name id.

#searchphraseexact

This is generated by the type=”component” include when you’re in the search form page view. This is a field name id.

#voteid1,#voteid2,#voteid3,

and so on

This is generated by the type=”modules” include. This is generated by the poll module and are field name ids for the radio buttons.

 

 

Packt

Share
Published by
Packt

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago