48 Simple, Elegant Frame (Box) Designs: Copy-and-Paste CSS

Contents
  1. How to use frames on your blog
  2. Thin line frames
  3. Thick line frames
  4. Dashed frames
  5. Dotted frames
  6. Double line frames
  7. Rounded corners
  8. Frames with a background color
  9. White line frames
  10. Frames with a shadow
  11. Easy tweak: changing the colors

This post was automatically translated by AI from the Japanese original. The screenshots are in Japanese.

In this post I’ve prepared decorative frame designs you can copy and paste into a free blog, with a simple, grown-up look.
I also explain how to change them to your favorite colors.

Setting a frame around some text makes it stand out in your post and gives the page some rhythm.

Readers usually skim a post. Text inside a frame is more likely to catch their eye with an “Oh!”

If you find a design you like, please give it a try!

I’ll show you CSS frames that work even on free blogs.
With a little effort, your posts become much easier to read and look more stylish.

And if you find yourself thinking I want to reflect my own style even more, moving to WordPress gives you far more freedom in design.

How to use frames on your blog#

For beginners: paste the code into your post#

The free blogging service you use should have an “HTML tag editing” mode in the post editor.

Paste the code from this post there.

The steps below use three Japanese blogging services: Ameblo, Hatena Blog and Livedoor Blog.

Ameblo#

  1. Click “HTML view” below the post editor and paste the code
  2. Go back to “Normal view” and change the text

How to add a frame on Ameblo (in Japanese)

Paste the code in HTML view

How to add a frame on Ameblo (in Japanese)

Normal view: change the text

Hatena Blog#

  1. Click “HTML editing” to the right of the “WYSIWYG” mode and paste the code
  2. Go back to “WYSIWYG” mode and change the text

How to set up a frame on Hatena Blog (in Japanese)

Paste the code in HTML editing mode

How to set up a frame on Hatena Blog (in Japanese)

Change the text in WYSIWYG mode

Livedoor Blog#

  1. Click “HTML tag editing” on the right side of the editor and paste the code
  2. Click “HTML tag editing” again to return to normal mode, then change the text

How to set up a frame on Livedoor Blog (in Japanese)

Turn HTML tag editing ON and paste the code

How to set up a frame on Livedoor Blog (in Japanese)

Turn HTML tag editing OFF and replace the text

[Advanced] If you can edit CSS:#

If you know CSS, you can also put the code from this post into your CSS file.

For example, take this code:

<div style="border:1px solid #f4978e; padding:16px; margin:20px;">Your text here</div>

Write the part inside <div style="..."> in your CSS file.

In WordPress, you can edit it from Appearance > Theme File Editor > style.css.

For the example above, add this to the file:

.box{
border:1px solid #97D3D3;
padding:16px;
margin:20px;
}

You can give “box” in .box any name you like.

Where you want to use the frame, specify the name you used in the CSS (“box”) as the class.

In WordPress, enter the class name under “Advanced” > “Additional CSS class(es)” at the bottom right of the block settings.

<div class="box">
Your text here
</div>

Thin line frames#

Pink

Your text here
<div style="border:1px solid #f4978e; padding:16px; margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:1px solid #98c1d9; padding:16px; margin:20px;">Your text here</div>

Green

Your text here
<div style="border:1px solid #a4c3b2; padding:16px; margin:20px;">Your text here</div>

Thick line frames#

Increase the px value of border to make the line thicker.

2px border#

Pink

Your text here
<p><br /></p>
<div style="border:2px solid #f4978e; padding:16px; margin:20px;">Your text here</div>
<p><br /></p>

Blue

Your text here
<p><br /></p>
<div style="border:2px solid #98c1d9; padding:16px; margin:20px;">Your text here</div>
<p><br /></p>

Green

Your text here
<p><br /></p>
<div style="border:2px solid #a4c3b2; padding:16px; margin:20px;">Your text here</div>
<p><br /></p>

3px border#

Pink

Your text here
<p><br /></p>
<div style="border:3px solid #f4978e; padding:16px; margin:20px;">Your text here</div>
<p><br /></p>

Blue

Your text here
<p><br /></p>
<div style="border:3px solid #98c1d9; padding:16px; margin:20px;">Your text here</div>
<p><br /></p>

Green

Your text here
<p><br /></p>
<div style="border:3px solid #a4c3b2; padding:16px; margin:20px;">Your text here</div>
<p><br /></p>

A line that is too thick tends to look clunky, so I recommend staying at 5px or less!

Dashed frames#

Thin dashed line#

Pink

Your text here
<div style="border:1px dashed #f4978e; padding:16px; margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:1px dashed #98c1d9; padding:16px; margin:20px;">Your text here</div>

Green

Your text here
<div style="border:1px dashed #a4c3b2; padding:16px; margin:20px;">Your text here</div>

Thick dashed line#

Pink

Your text here
<div style="border:2px dashed #f4978e; padding:16px; margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:2px dashed #98c1d9; padding:16px; margin:20px;">Your text here</div>

Green

Your text here
<div style="border:2px dashed #a4c3b2; padding:16px; margin:20px;">Your text here</div>

Dotted frames#

Dots can make it look cuter, don’t you think?

Small dots#

Pink

Your text here
<div style="border:3px dotted #f4978e; padding:16px; margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:3px dotted #98c1d9; padding:16px; margin:20px;">Your text here</div>

Green

Your text here
<div style="border:3px dotted #a4c3b2; padding:16px; margin:20px;">Your text here</div>

Large dots#

Pink

Your text here
<div style="border:5px dotted #f4978e; padding:16px; margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:5px dotted #98c1d9; padding:16px; margin:20px;">Your text here</div>

Green

Your text here
<div style="border:5px dotted #a4c3b2; padding:16px; margin:20px;">Your text here</div>

Double line frames#

Pink

Your text here
<div style="border:5px double #f4978e; padding:16px; margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:5px double #98c1d9; padding:16px; margin:20px;">Your text here</div>

Green

Your text here
<div style="border:5px double #a4c3b2; padding:16px; margin:20px;">Your text here</div>

Rounded corners#

Pink

Your text here
<div style="border:2px solid #f4978e;border-radius:10px;padding:16px; margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:2px solid #98c1d9; border-radius:10px; padding:16px; margin:20px;">Your text here</div>

Green

Your text here
<div style="border:2px solid #a4c3b2; border-radius:10px; padding:16px; margin:20px;">Your text here</div>

Frames with a background color#

I think it looks cute when the border is thin and just a little darker than the background color ☺️

Solid border#

Pink

Your text here
<div style="border:2px solid #f4978e;background-color:#f8edeb;padding:16px; margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:2px solid #98c1d9; background-color:#eaf4f4;border-radius:10px; padding:16px; margin:20px;">Your text here</div>

Green

Your text here
<div style="border:2px solid #a4c3b2;background-color:#F3F7F5;padding:16px; margin:20px;">Your text here</div>

Double border#

Pink

Your text here
<div style="border:5px double #f4978e;background-color:#f8edeb;padding:16px; margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:5px double #98c1d9; background-color:#eaf4f4;padding:16px; margin:20px;">Your text here</div>

Green

Your text here
<div style="border:5px double #a4c3b2;background-color:#F3F7F5;padding:16px; margin:20px;">Your text here</div>

A border that fades a little#

Pink

Your text here
<div style="background-color:#f4978e;padding:6px;margin:20px;"><div style="background-color:rgba(255, 255, 255, 0.5);border:1px solid #b4b4b4;box-shadow:0 0 0 6px #f4978e;padding:16px;">Your text here</div></div>

Blue

Your text here
<div style="background-color:#98c1d9;padding:6px;margin:20px;"><div style="background-color:rgba(255, 255, 255, 0.6);border:1px solid #b4b4b4;box-shadow:0 0 0 6px #98c1d9;padding:16px;">Your text here</div></div>

Green

Your text here
<div style="background-color:#a4c3b2;padding:6px;margin:20px;"><div style="background-color:rgba(255, 255, 255, 0.5);border:1px solid #b4b4b4;box-shadow:0 0 0 6px #a4c3b2;padding:16px;">Your text here</div></div>

White line frames#

Dashed line, stitched look#

Pink

Your text here
<div style="border:2px dashed #ffffff;background-color:#f8edeb;box-shadow:0 0 0 6px #f8edeb;padding:16px;margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:2px dashed #ffffff;background-color:#eaf4f4;box-shadow:0 0 0 6px #eaf4f4;padding:16px;margin:20px;">Your text here</div>

Green

Your text here
<div style="border:2px dashed #ffffff;background-color:#F3F7F5;box-shadow:0 0 0 6px #F3F7F5;padding:16px;margin:20px;">Your text here</div>

Solid line, notice style#

Pink

Your text here
<div style="border:3px solid #ffffff;background-color:#f8edeb;box-shadow:0 0 0 6px #f8edeb;padding:16px;margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:3px solid #ffffff;background-color:#eaf4f4;box-shadow:0 0 0 6px #eaf4f4;padding:16px;margin:20px;">Your text here</div>

Green

Your text here
<div style="border:3px solid #ffffff;background-color:#F3F7F5;box-shadow:0 0 0 6px #F3F7F5;padding:16px;margin:20px;">Your text here</div>

White double line, for a stylish look#

Pink

Your text here
<div style="border:5px double #ffffff;background-color:#f8edeb;box-shadow:0 0 0 6px #f8edeb;padding:16px;margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:5px double #ffffff;background-color:#eaf4f4;box-shadow:0 0 0 6px #eaf4f4;padding:16px;margin:20px;">Your text here</div>

Green

Your text here
<div style="border:5px double #ffffff;background-color:#F3F7F5;box-shadow:0 0 0 6px #F3F7F5;padding:16px;margin:20px;">Your text here</div>

Frames with a shadow#

Sharp shadow#

Pink

Your text here
<div style="border:1px solid #f4978e;box-shadow: 4px 4px 1px #f4978e;padding:16px;margin:20px;">Your text here</div>

Blue

Your text here
<div style="border:1px solid #98c1d9;box-shadow: 4px 4px 1px #98c1d9;padding:16px;margin:20px;">Your text here</div>

Green

Your text here
<div style="border:1px solid #a4c3b2;box-shadow: 4px 4px 1px #a4c3b2;padding:16px;margin:20px;">Your text here</div>

Soft shadow#

Pink

Your text here
<div style="background-color:#f8edeb;box-shadow: 0px 0px 8px 8px #f8edeb;padding:16px;margin:20px;">Your text here</div>

Blue

Your text here
<div style="background-color:#eaf4f4;box-shadow: 0px 0px 8px 8px #eaf4f4;padding:16px;margin:20px;">Your text here</div>

Green

Your text here
<div style="background-color:#F3F7F5;box-shadow: 0px 0px 8px 8px #F3F7F5;padding:16px;margin:20px;">Your text here</div>

Easy tweak: changing the colors#

Colors use a color code (in Japanese): a # followed by six letters and digits, like “#FFFFFF”.

Swap the color code to change the color.

color…text color

background-color…background color

I pick colors from Coolors, a site that shows stylish color palettes.

I hope you find a design you like.

Emi
Emi

Making, playing, and widening my world