Site logo

Archived topic

Underline on links in Bullet Lists

3 replies · Started by Mark on June 14, 2022

Viewing posts 1–4 of 4

Hi,

I currently have underscores only in paragraph text. I would like to also have this on text links on bullet lists.

We use this CSS:

.entry-content p > a:not(:hover) {
text-decoration: underline;
}

What do we need to add to achieve this?

Note that we do not want underscores on links contained within headings (H2 H3 etc) or buttons etc.

Hi Mark,

You can modify your current code into something like this to include lists:

.entry-content p a:not(:hover), .entry-content ul > li a:not(:hover), .entry-content ol > li a:not(:hover)  {
text-decoration: underline;
}

I removed the > in .entry-content p > a:not(:hover) because adding > would make links labeled as strong in Paragraph Blocks not underline. You can put this back if that’s what you prefer. So, this instead:

.entry-content p > a:not(:hover), .entry-content ul > li a:not(:hover), .entry-content ol > li a:not(:hover)  {
text-decoration: underline;
}

Hope this helps!

Perfect! Thank you :)

You’re welcome Mark!

This archived topic is closed to new replies.