CALL 425.830.8350 FOR CUSTOM WORDPRESS DESIGNS
I was surfing for some recipes the other day and happened across what I thought was a nicely styled ordered list that used connecting dots to add a nifty touch to the display. I dug into their source code to see how it was done and how it could be repeated easily and came up with these solutions. The dots/lines will automatically stretch to the height of each list item.

First, here’s what it looks like so we know what we’re talking about:

  1. 1 Adipiscing elementum, turpis etiam ut porttitor augue arcu, est mid vut odio dignissim amet habitasse platea ac turpis lacus dolor, nunc, nec mid. Dictumst nec proin parturient sed dapibus urna! Tempor vel nec tincidunt sed magna, phasellus vel porta. Nisi dapibus ac ultrices cursus tincidunt hac eu et, diam odio, amet nec, vut elementum,
  2. 2Adipiscing elementum, turpis etiam ut porttitor augue arcu, est mid vut odio dignissim amet habitasse platea ac turpis lacus dolor, nunc, nec mid. Dictumst nec proin parturient sed dapibus urna! Tempor vel nec tincidunt sed magna, phasellus vel porta. Nisi dapibus ac ultrices cursus tincidunt hac eu et, diam odio, amet nec, vut elementum, Adipiscing elementum, turpis etiam ut porttitor augue arcu, est mid vut odio dignissim amet habitasse platea ac turpis lacus dolor, nunc, nec mid. Dictumst nec proin parturient sed dapibus urna! Tempor vel nec tincidunt sed magna, phasellus vel porta. Nisi dapibus ac ultrices cursus tincidunt hac eu et, diam odio, amet nec, vut elementum,
  3. 3Adipiscing elementum, turpis etiam ut porttitor augue arcu, est mid vut odio dignissim

The HTML Code

This is one way to do it, using a wrapping div.

The CSS Code

This should be placed in your child theme stylesheet or similar location in order to make it a ‘global’ effect for all OL’s.

As you can see, we’ve instructed the OL’s within the div class “.dots-list” to create the dots and connecting lines as backgrounds. You could also skip the use of the actual div wrapper and, in Divi, assign the class name to the module you’re inserting the list into (typically it would be text module or possibly a blurb). I showed it this way so that anyone not using Divi could still apply the CSS directly with the use of the wrapping div.

Using It For Uniformed Lists

To adapt this to a regular UL all you need to do is remove the ‘span’ tags and the numbers from the HTML. Since the OL list CSS has told the numbers to not display ( list-style: none; removes the numbers ) we have manually added them back in using the ‘span’ tag which then allows the CSS to format their location and style. The other change necessary is in the CSS code where you reference OL, you would need to change that to UL. Like this:

Have Fun!

Pin It on Pinterest

Share This