Content Color Boxcreate A Colored Content Box.



  1. How To Create Rounded Corners For Your Box Borders In CSS
  2. 40 Fun And Easy Valentine’s Day Crafts For Kids
  3. How To Start A List With A Number Other Than 1 And Still Have It Automatically Numbered (HTML)
  4. Cached
  1. Dock the 'Properties Bar'on your main toolbar: After using 'Ctrl + E'to bring up the 'Text Box Properties'bar, you. Can drag and drop it on to your main toolbar, then lock the main toolbar. By right-clicking anywhere on the gray background of the main toolbar. Scrolling down to click on 'Lock Toolbars'.
  2. I have a picture on a html file/site and I want to add the list of available colors for that picture. I want to create very small boxes or dots, a small box for every color.

How to Create a Coloured ('Colored') Box in HTML/CSS by Christopher Heng, thesitewizard.com I was asked by a visitor how he could create a box, give it a background colour ('color' if you use a different variant of English), and insert text in it, the way some printed magazines and books sometimes place additional information in a separate box or panel on a page.

Boxes can be used to hold content in the main body of a dashboard.




Contents of the box.


Optional title.


Optional footer text.


The status of the item This determines the item's backgroundcolor. Valid statuses are listed in validStatuses.


Should the header be shown with a solid color background?


If NULL (the default), the background of the box will bewhite. Otherwise, a color string. Valid colors are listed invalidColors.


The width of the box, using the Bootstrap grid system. This isused for row-based layouts. The overall width of a region is 12, so thedefault valueBox width of 4 occupies 1/3 of that width. For column-basedlayouts, use NULL for the width; the width is set by the column thatcontains the box.


The height of a box, in pixels or other CSS unit. By defaultthe height scales automatically with the content.


If TRUE, display a button in the upper right that allowsthe user to collapse the box.


If TRUE, start collapsed. This must be used withcollapsible=TRUE.

See Also

Other boxes: infoBox, tabBox,valueBox


Example output

We all know writing good content is hard.

But you also need to make it as visually appealing as possible if you want the most people to read that content.

How To Create Rounded Corners For Your Box Borders In CSS

Enter colored text boxes:

Sprucing up your wordpress content with content color boxes adds a nice touch to your content…

…and since most bloggers and website owners aren’t doing it, you can really set yourself and your content apart from the crowd.

Here’s how to do it:

Step 1: Creating a Colored Text Box with HTML

Head over to the piece of content that you want to add your colored text box to.

You need to go to the “Text” tab of the wordpress text editor since you’ll be entering some code.

Now find the sentence/text or whatever else you want your colored text box to contain.

4 keys to successful fundraising. From here, add this to the beginning of your text/sentence:

Now add this to the end of that text/sentence:


For example, I’m going to create a text box around the sentence:

“This is colored text box.”

Javascript - Create a small color box in html - Stack Overflow

And here’s what it will look like:

<div>This is a colored text box.</div>

Note: you can name the part between the quotes to whatever you want; so it could be “redbox” or “bluebox” or “colorthing”.

Again, just make sure you’re doing this in the text editor and not the visual editor of the wordpress post editor.

So at this point if you were to preview your post you’d notice that nothing happens to the sentence that you’ve just wrapped in your colorbox code.

This is because we need to tell our website what that color box is supposed to look like.

Here’s how:

Step 2: Styling our Colored Text Box with CSS

Javascript - Create a small color box in html - Stack Overflow

40 Fun And Easy Valentine’s Day Crafts For Kids

You’ll now need to head over to your preferred means of adding CSS to your website.

That will likely either be through your child themes style.css sheet located in Appearance>Editor…

…or through the use of a custom css plugin like Simple Custom CSS…

…or by going to Appearance>Customize>Additional CSS in your wordpress dashboard.

If you don’t have a preferred way, we’re going to go to Customize>Additional CSS (available for all wordpress versions 4.4 or later).

However, before you do that it’s better if we can open the Customize option panel directly on the post we’re adding the colorbox to.

So press the “preview” button on the post you’re adding the colored box to in order to preview your post, which should open it up in a new window.

From here, press the customize option located at the top in the admin bar:

And then click on Additional CSS within the customize options:

Otherwise, save the post as private and navigate to it after going to Appearance>Customize.

The point is that you just want to be in Customize>Additional CSS page while having the post containing the color box up on your screen.

The reason is because it will allow you to preview CSS changes in real-time.

Next, we need to add this code into our Additional CSS:

Remember to change the “#colorbox” part to whatever you named your color box before; so if you named it “redbox” you’d put “#redbox” instead.

Now, between these brackets you need to add the specifics of how you want to style your box.

Content Color Boxcreate A Colored Content Box.

Here’s what you probably want to do:

#colorbox {
background-color: #dff8ec;

Adding “background-color: #dff8ec;” will make the box have color:

Note: You can find the hex numbers for different colors by going to a place like Color Hex or Adobe.

How to Create Rounded Corners for Your Box Borders in CSSHTML

Okay, so this doesn’t look so great. And we’re going to add some padding to fix that.

#colorbox {
background-color: #dff8ec;
padding: 20px 30px 20px 30px;

Here’s what it looks like now:

If you want to center the text inside the box, you can do it as you normally would with any text: by highlighting the text in the visual editor tab of the post editor and pressing the align center button.

This is a color box with centered text

If your color box is appearing to close the the text that follows it in your articles you can add “margin-bottom: 25px;” to fix that:

#colorbox {
background-color: #dff8ec;
padding: 20px 30px 20px 30px;
margin-bottom: 25px;

Of course, change the “25px” to whatever you want.

One other styling option worth mentioning is adding a border:

This is achieved by adding “border: 3px solid #888;”.

#colorbox {
background-color: #dff8ec;
padding: 20px 30px 20px 30px;
margin-bottom: 25px;
border: 3px solid #888;

Where 3px is the thickness of the border; solid means it’s a solid line; and #888 is the color.

If you saw my post on how you can make passive income, you’ll see that I made a really thick border so my color box looked like it was inside another color box.

It looked like this:

If we apply that idea to our green box, by setting the “border: 3px solid #888;” to “15px” instead of “3px” we get a similar effect:

This is a color box with a thick border

The last thing I want to mention is making the box look rounder.

How To Start A List With A Number Other Than 1 And Still Have It Automatically Numbered (HTML)

We can achieve this by adding “border-radius: 5px;”.

#colorbox {
background-color: #dff8ec;
padding: 20px 30px 20px 30px;
margin-bottom: 25px;
border: 3px solid #888;

So now it looks like:

That’s It

Not too hard, right?


And now you can decorate all of your posts in as many colored boxes as you want.

Add these into your content to keep it interesting and your visitors will love it.