0
Answered

CSS classes for blocks

Elizabeth Stephens 5 years ago in BLOX CMS updated by Christine Masters (Director of Product Management) 5 years ago 1
I'm trying to center text in a text utility block, and it seems like that would be an available CSS class but I can't find documentation for what CSS classes work on blocks. (1) Can text be centered? (2) Where is the documentation for CSS classes for blocks?

Answer

Answer
Answered
In general, it depends on the block. Different blocks have different classes that could be used. Also, each block has its own block ID which creates a unique class that can be targeted.

One of my favorite techniques is that you can add a class into the settings of the block. So in this case, I'm adding a class called "center-text."




By itself, these custom classes don't do anything. It just inserts the class into the div created by the system.

You would have to create your own CSS which then targets that class, and possibly other items inside the block, to create your rules.

I would recommend using Firebug or Web Developer Tools to test out the rules and classes and see what specific items you need to target to accomplish what you want.

Let me know if this helps!


Answer
Answered
In general, it depends on the block. Different blocks have different classes that could be used. Also, each block has its own block ID which creates a unique class that can be targeted.

One of my favorite techniques is that you can add a class into the settings of the block. So in this case, I'm adding a class called "center-text."




By itself, these custom classes don't do anything. It just inserts the class into the div created by the system.

You would have to create your own CSS which then targets that class, and possibly other items inside the block, to create your rules.

I would recommend using Firebug or Web Developer Tools to test out the rules and classes and see what specific items you need to target to accomplish what you want.

Let me know if this helps!