Collection of hand-picked free HTML and CSS border code examples

Explore a collection of hand-picked free HTML and CSS border code examples to add unique and stylish border designs to your website elements.

Animated Border Image

Author:
GrahamTheDev | November 27, 2022
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-
Partial Gradient Border

Partial Gradient Border

Author:
Jeremy Frank | November 14, 2022
Made with:
HTML / CSS

About a code

Partial gradient border surrounding a circle image, which is done with a CSS conic gradient and a radial gradient mask.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-
Gradient Border with Rounded Corners

Gradient Border with Rounded Corners

Author:
Adam Argyle | November 7, 2022
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-
Background Border

Background Border

Author:
daniesy | November 4, 2022
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
Patterned Borders

Patterned Borders

Author:
Natalia | August 17, 2022
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
Custom Dashed Border

Custom Dashed Border

Author:
Temani Afif | August 10, 2022
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-
Colorful Border

Colorful Border

Author:
Thea | June 30, 2022
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-

Gradient Border Effect

Author:
Hyperplexed | March 29, 2022
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
Gradient Border + Transparent Background

Gradient Border + Transparent Background

Author:
Fabian Michael | January 27, 2022
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-
Border Linear-Gradient + Border-Radius

Border Linear-Gradient + Border-Radius

Author:
Chicagez | January 11, 2022
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-
Corner-only Border

Corner-only Border

Author:
Ana Tudor | November 4, 2021
Made with:
HTML / CSS (SCSS)

About a code

Corner-only border (allows for corner rounding & gradient border).

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
8bit border-image

8bit border-image

Author:
Nils Binder | July 5, 2021
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
8-bit Pixel Border

8-bit Pixel Border

Author:
Rob DiMarzo | June 30, 2021
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
Avatar Border Effect. 15 Declarations, 1 Element, No Pseudos

Avatar Border Effect. 15 Declarations, 1 Element, No Pseudos

Author:
Ana Tudor | April 15, 2021
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

Use SVG for border-image

Author:
Louis Hoebregts | August 25, 2020
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
CSS Gradient Borders

CSS Gradient Borders

Author:
Ananya Neogi | August 3, 2020
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
Borders & Gradients

Borders & Gradients

Author:
Ivan Bogachev | March 31, 2020
Made with:
HTML / CSS (Less)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-
Multiple Border-Radius Values

Multiple Border-Radius Values

Author:
Jad Limcaco | March 29, 2020
Made with:
HTML / CSS

About a code

You probably knew that you can set the border-radius of an element to 4 values, and using shorthand, it goes clock-wise from top, right, bottom, left. But did you know you can actually set up to 8 values if you separate them? Each corner can have 2 values as you can see in this example.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
CSS Candy Stripe Border Using Clip-Path

CSS Candy Stripe Border Using Clip-Path

Author:
Brian Haferkamp | March 5, 2020
Made with:
HTML (Pug) / CSS (Sass)

About a code

Create a responsive candy stripe border using the clip-path property on each of the list items in a ul. Change the height, background color, and stripe color very easily.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
Offset and XOR Frame: Lively

Offset and XOR Frame: Lively

Author:
Ana Tudor | March 4, 2021
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
Full Screen Vintage Frame with Multiple Borders

Full Screen Vintage Frame with Multiple Borders

Author:
Tudor Sfătosu | January 31, 2020
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
bootstrap.css
Gradient Border

Gradient Border

Author:
Michael Burridge | January 8, 2020
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
Pure CSS Circular Border Patterns

Pure CSS Circular Border Patterns

Author:
Ana Tudor | December 27, 2019
Made with:
HTML (Pug) / CSS (SCSS)

About a code

The border patterns are created with clip-path on a pseudo-element.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-

Fitted Border Image the Easy Way

Author:
ShopTalk Show | December 12, 2019
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
Map-Inspired Border

Map-Inspired Border

Author:
Stephy | March 21, 2019
Made with:
HTML / CSS (SCSS)

About a code

Map-inspired border effect using stacked border & box-shadows. Single HTML element with CSS.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

Discover Our Extensive Snippet Library

This heading suggests that your website provides a wide variety of snippets across different technologies, encouraging users to explore and use these resources for their development projects.

HTML Snippets.

Explore a collection of HTML snippets designed to streamline your web development process. From basic structures to complex elements.

CSS Snippets.

Discover powerful CSS snippets that help you style your web pages with ease. Whether you need layout solutions, animations

JavaScript Snippets.

Enhance your website's interactivity with our JavaScript snippets. From DOM manipulation to advanced algorithms

Bootstrap Snippets.

Leverage the power of Bootstrap with our collection of snippets. Quickly integrate responsive design components

Tailwind Snippets.

Speed up your development process with Tailwind CSS snippets. These utility-first CSS snippets enable you to

jQuery Snippets.

Simplify your JavaScript development with jQuery snippets. Easily perform common tasks like event handling, animations

React Snippets.

Build robust, component-based user interfaces with our React snippets. From state management to lifecycle methods,

Vue Snippets.

Streamline Vue.js development with our collection of snippets for creating components, managing state, and handling events.

Ready to set your Brand ablaze?

Let's craft a visual identity that ignites passion and loyalty. ✨