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

Karr Fager
January 16, 2020
About the Author
Karr Fager is the digital marketer and owner at Digital Red Panther, a web design and SEO company that offers sleek digital marketing services for small businesses.

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