Divi Tutorial – A Cool Animated Divider

Divi Tutorial – A Cool Animated Divider

updated May 27th 2022

Did you see the divider animate in? I think that’s pretty cool. Especially since it animates on scroll. So it’s pretty neat.

It’s a neat little trick, and here’s how you do it.

Let’s start with a bar counter module. We’re going to use it as an animated underline to a heading. Go ahead and add a bar counter.

Make the background of the module itself transparent by pulling down the opacity to 0.
And add cool-divider to the custom class.

Now for the counter.

Set the percentage to 100.

and set the color you want in the counter background (next tab)

And of course, add this CSS to a place where you add custom CSS.
(Divi theme options, theme customizer, child theme CSS file, or page custom CSS)

.cool-divider.et_pb_counters > li {
	margin: 0px !important;
	padding: 0px !important;
	text-indent: 0px !important;
}
.cool-divider.et_pb_counters > li:before {
	content: none !important;
}
.cool-divider.et_pb_counters .et_pb_counter_container {
    width: 90px;
    margin: 0 auto;
    height: 2px;
}
.cool-divider.et_pb_counters span.et_pb_counter_amount_number {
	display: none;
}


 

Photo by Simone Hutsch on Unsplash

 
[sc name=”learn css”]
 

Edit: I had a comment on my YT video asking about why I don’t just use the divider module. I got a FB comment about this as well.

My answer to not using the divider module is that
– I like how this is subtle yet eye-catching.
– It’s contradictory, I know, but it’s something that when noticed is pretty cool, without being too overbearing.
– That’s the kind of animation that I like using.
– My style isn’t too heavy on things popping up slowly, bogging down the scroll and readability.

Hope this makes sense. :)

Leave a Reply

Your email address will not be published. Required fields are marked *

    New tutorials

    Why no ads?

    Hi, I'm PK, and I maintain and publish content on this site for two reasons.

    1. To give back to the community. I learned so much from people's tutorials and StackOverflow that I wanted to contribute and help others.

    2. To provide a more structured learning experience. People struggle to find the course that guides them from start to finish, based off of real life experience, and my courses provide that.

    The only "ads" I have here are for my own courses, and maybe an affiliate link, but that's it. They fund the website resources and provide more motivation for me to produce better content.

    Any bit of interest helps. Even sharing with your friends, suggesting my courses to your developer or designer, or subscribing to my YT channel, or joining our Discord. Thanks and I'll see you around!

    There's a newsletter!

    Sign up to the newsletter for the occasional updates on courses, products, tutorials, and sales.