Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
marsh

Creating a colored box around text, other blocks and/or multiple blocks?

Question

I'm looking to to add a colored square around blocks of text to act as a border for those sections. Is there any custom CSS/MarkDown script that could achieve this? If possible, it would be great to have this happen around multiple blocks as well (for pairing a description with a video, etc).

Thanks.

Edited by marshallf
Initial Revision

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 1
Guest

The easiest way to do that would be to add a Code Block, which you can then style in the CSS Editor.

Try adding something like this to a Code Block, replacing

class-name

with your own class name:


<div class = "class-name">
This is the text inside the code block.
</div>

alt text

Then, you can style it in the CSS Editor by going to Design > Custom CSS and entering something like this:


.class-name {
   text-align: center;
   font-family: arial;
   font-size: 20px;
   padding: 20px;
   border: 3px solid red;
}

You can replace the values in this as appropriate, but this would give you something along the lines of:

alt text

To set up multiple Code Blocks this way, just give each one the same class name.

In terms of the CSS, these links are also good for reference:

Hope this helps!

block.png.a115c1b70291475762a486114bd64510.png

code-block.png.b86b6d60abfcc4ab31e7a8dd317a2aa1.png

Edited by Guest

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...