how to add colored content box to wordpress

source: (+)

It may have come to you that you posted something on your website and you wanted to create a color box or even an empty box.

For example see the picture below:

how we can create this colorful box without any plugin in WordPress?

To do this, just go to the text editor of your wordpress page.

Now, enter the below code at the beginning of the text box that appears in the color box:

and put the below code at the end of the text.
You can see the text editor of the same post as below.
As you can see, the red boxes are the same as above.

How we can personalize this colorful boxes?

As you can see in the code above, near to the border word, 1px is written. you can change it. for example 10 px. You see in the below picture how it can affect our box.
Also, if you change the color from black to blue, you will see a box with blue color around it.
If you change the padding digit from 1.2 em to 5, you can find the following colorful box.
Also, if you wan to change the background color, just type for example blue, instead of yellow.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s