Below is the code used in the HotDoodle theme TPL to create a style that will be added to and be able to be selected from the Styles tab of every block in that website.
{declare_style style=extraTopPadding name='Extra Top Padding' cat='Combination' rev=1 order=975 desc='??????????????'}
div.extraTopPadding_container_box [
margin-top: 20px;
]
.extraTopPadding_moduletitle [
]
.extraTopPadding_modulebody [
]
Copy and paste the above code at the end of the CSS of the theme TPL.
The text highlighted in yellow is the name to identify the style. Note: this has to start with a letter, it can't start with a number, it also has to start with a lower case with no spaces as shown.
The text highlighted in green is the name that will appear on the Style tab with a check box next to it. This name can have spaces and uppercase.
The text highlighted in blue is the CSS style to apply. Normal CSS rules apply.
The CSS style can apply to:
the whole container under (_container_box)
the module title under (_moduletitle)
the module body under (_modulebody)
In order for the style to work, all three 1.(_container_box) 2.(_moduletitle) and 3.(_modulebody) need to be present even if there is no CSS for some.
In the above code, the padding (margin-top: 20px;) can be placed in the (_container_box) or the (_moduletitle) and have the same effect as long as there is no background image for the moduletitle. If there is a background image for the moduletitle and the padding ( margin-top: 20px;) is placed under (_moduletitle), then the text of the moduletitle only will get padded, but the background image will not. To pad the title, text, and the background image together, place the padding (margin-top: 20px;) in the _container_box.
Most blocks are within a container of some kind
(container_box) is the main wrapper for all containers. It is invoked by itself. e.g.
<div class="container_box">
Currently, there are no blocks that don't have a container_box around them. |