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

Contents
  1. Choose a color and a shape to make the code
  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!

Choose a color and a shape to make the code#

Choose a color and a line style, and you’ll get code ready to copy and paste.
If you’d rather get started than browse the samples, start here.

Turn on JavaScript to choose a color and a shape and get the code. You can also copy the sample code below.

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.

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