simple border to draw

"Simple Border Drawing Tutorial: Easy Steps & Techniques"

By James Young
AD

Ever found yourself in need of adding a simple border to an element in your web design, but felt overwhelmed by the sheer number of border properties CSS offers? Fear not! In this guide, we'll simplify the process and help you draw a border with ease.

Understanding CSS Border Properties

Before we dive into drawing a simple border, let's quickly recap the key CSS border properties:

  • border-width: Sets the thickness of the border.
  • border-style: Defines the style of the border (e.g., solid, dashed, dotted).
  • border-color: Sets the color of the border.

Drawing a Simple Border

To draw a simple border around an element, you can use the shorthand border property or specify each property individually. Here's how you can do it:

AD
😊 14 Fun Doodle Border Ideas ✏️ Simple And Easy Frames & Cute Corner Doodles for Journals
😊 14 Fun Doodle Border Ideas ✏️ Simple And Easy Frames & Cute Corner Doodles for Journals
the 25 simple kawai borders are shown in different colors
the 25 simple kawai borders are shown in different colors
Designs For Journal Border Aesthetic, Drawing Border Ideas, Whiteboard Lettering Ideas, Simple Design Ideas, Border Styles, Letter Border Designs, Cute Writing Fonts, Copy Front Page Design, Journaling Fonts
Designs For Journal Border Aesthetic, Drawing Border Ideas, Whiteboard Lettering Ideas, Simple Design Ideas, Border Styles, Letter Border Designs, Cute Writing Fonts, Copy Front Page Design, Journaling Fonts

Using the Shorthand border Property

You can set all border properties at once using the border shorthand. The syntax is: border: width style color;

For example, to add a 2px solid black border around an element, you would write:

the letter c is made up of flowers and leaves, with one flower on each side
the letter c is made up of flowers and leaves, with one flower on each side
lower back tattoo ideas.
lower back tattoo ideas.
an assortment of hand drawn plants and flowers in black ink on white paper, with the words
an assortment of hand drawn plants and flowers in black ink on white paper, with the words
border: 2px solid black;

Specifying Each Border Property

If you prefer, you can set each border property individually:

border-width: 2px;
border-style: solid;
border-color: black;

Setting Border for Different Sides

By default, the border property applies to all four sides of an element. However, you can also set borders for specific sides using the following properties:

AD
  • border-top
  • border-right
  • border-bottom
  • border-left

Border Radius for Rounded Corners

To add rounded corners to your border, use the border-radius property. The value can be a single value for all corners, or four values for top-left, top-right, bottom-right, and bottom-left corners respectively.

Corner Ornament Stock Vector Illustration and Royalty Free Corner Ornament Clipart
Corner Ornament Stock Vector Illustration and Royalty Free Corner Ornament Clipart
20 Easy Doodle Dividers & Borders For Notes ✨📓
20 Easy Doodle Dividers & Borders For Notes ✨📓
Swirls
Swirls
Frame Doodles Tutorial
Frame Doodles Tutorial
a notebook with some different types of doodles on it and the words borders written in cursive writing
a notebook with some different types of doodles on it and the words borders written in cursive writing
Cute & Easy Borders to Draw — Sweet PlanIt
Cute & Easy Borders to Draw — Sweet PlanIt

For example, to add a 10px border radius to all corners, you would write:

border-radius: 10px;

Border Comparison Table

Here's a quick comparison of the different ways to set a border:

AD
Property Syntax Example
border border: width style color; border: 2px solid black;
Individual properties border-width: width; border-style: style; border-color: color; border-width: 2px; border-style: solid; border-color: black;
Specific sides border-top: width style color; border-right: width style color; border-bottom: width style color; border-left: width style color; border-top: 2px solid black; border-right: 2px solid black; border-bottom: 2px solid black; border-left: 2px solid black;

And there you have it! You're now equipped to draw simple borders in CSS like a pro. Happy coding!

Blue border drawing
Blue border drawing
Set of Doodle Frames, Borders, Corners, Dividers, Ribbons, Weekdays and Design Elements Stock Vector - Illustration of copybook, collection: 120246909
Set of Doodle Frames, Borders, Corners, Dividers, Ribbons, Weekdays and Design Elements Stock Vector - Illustration of copybook, collection: 120246909
Blue border drawing
Blue border drawing
the doodle dividers are lined up on top of each other
the doodle dividers are lined up on top of each other
Doodle frames set. Hand drawn ink borders, vintage elegant frames. Ornamental rectangular elements for branding and design Векторне зображення Stock
Doodle frames set. Hand drawn ink borders, vintage elegant frames. Ornamental rectangular elements for branding and design Векторне зображення Stock
a drawing of a flower with swirls on it
a drawing of a flower with swirls on it
two black and white ornamental designs with swirls on the top, bottom and bottom
two black and white ornamental designs with swirls on the top, bottom and bottom
border design 🪞🌸
border design 🪞🌸
an image of some type of drawing on the whiteboard with black lines and swirls
an image of some type of drawing on the whiteboard with black lines and swirls
a piece of paper sitting on top of a table next to crayons and markers
a piece of paper sitting on top of a table next to crayons and markers
Borders
Borders
a black and white drawing of a square frame with vines on the edges, as well as
a black and white drawing of a square frame with vines on the edges, as well as
a set of hand drawn doodles with different shapes and designs on white paper stock illustration
a set of hand drawn doodles with different shapes and designs on white paper stock illustration
AD