Advanced Joomla Templating (pt1) Using Module Class Suffix
Using module class suffix
an article from User Written Resources (http://userwrittenresources.com)
- .module {}
- div.moduletable {}
- div.moduletable h3 {}
- table.moduletable {}/li>
- table.moduletable th
- table.moduletable td
and can include other styles used on the content in that section, such as;- ol, ul, li {}
- a:link,a:visited,a:hover {}
- a.readon:link,a.readon:visited,a.readon:hover {}
and others, note that certain modules already may have specific css styles associated with them (such as latestnews & mostread lists) so if you are modifying one of these modules, you might need to either remove the specific style so the module class suffix style can be applied, or just change those specific styles.example from "freemambo template"
| table.moduletable { float: left; padding: 0px; margin: 0px; width: 152px; background: url(../images/leftright.gif); } table.moduletable th { background: url(../images/subhead_bg.gif); font-size: 10px; text-align: center !important; text-align:center; padding-top: 4px; padding-left: 0px; height: 23px; text-decoration: none; width: 154px !important; width:152px; color:#FFFFFF; text-transform:uppercase; } table.moduletable td { font-size: 11px; padding-left: 5px; padding-right: 2px; font-weight: normal; color:#000000; } |
|
example of changes to "freemambo template" - adding suffix eg
| table.moduletableeg { float: left; padding: 0px; margin: 0px; width: 152px; } table.moduletableeg th { background-color: #FF9900; color: #333333; font-size: 12px; text-align: center !important; text-align:center; padding-top: 2px; padding-left: 0px; height: 23px; text-decoration: none; width: 154px !important; width:152px; text-transform:lowercase; } table.moduletableeg td { background-color: #EEEEEE; font-size: 11px; padding-left: 5px; padding-right: 2px; font-weight: normal; color:#FF0000; } |
|
- go to 'Modules' -> 'Site Modules'
- click on the module you'd like to apply the new css styles to
- enter the suffix you used in the module class suffix field & click 'Save'