How to Add an Inset Border to Divi Text Module Using CSS

Karr Fager
December 10, 2019
April 17, 2020

Looking for a way to add an inset border to your Divi text module? I've got you covered.

Here are the steps:

1. Go to the settings of your Divi text module --> Advanced --> Custom CSS

go to divi advanced custom css

2. Paste this code in the "Main Element" section.

  background: 297ca0;
	box-shadow: inset 0 0 0 4px #ffffff, inset 0 0 0 8px #297ca0; 

code to add inset borders in divi

3. Customize the CSS to your liking.

  • Update the size of the inner border by changing "8px" to your liking.
  • Update the size of the outer border by changing the "4px" to your liking.
  • Update the colors by selecting each color and sliding the wheel to your liking.

4. Make sure there is padding around your text so that the text doesn't reach the edges.

add padding to divi module
About the Author:
Karr Fager
Karr is the owner and digital marketer of Digital Red Panther, providing sleek online marketing services for small business.
Keep Learning About Web Design + SEO