how to add colored content box to wordpress

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:

<div style=”border:1px solid black;padding:1.2em; background-color:yellow;”>
and put the below code at the end of the text.
</div>
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.

Comments

Popular posts from this blog

How to make backlink by Medium

whatruns plugin in wordpress