Site logo

Archived topic

Same style of links in and

3 replies · Started by Albert on November 21, 2022

Viewing posts 1–4 of 4

Hi, I have this style applied to the links on my site:

.entry-content p a {
	border-bottom: 1px dashed #000; color: #000; text-decoration: none;}
.entry-content p a:hover {
	border-bottom: 1px dashed #39ba32; color: #39ba32; text-decoration: none;}

And this one for the list icons:

.entry-content>ul {
    list-style: none;
    margin-left: 0;}

.entry-content>ul>li {
    position: relative;
    padding-left: 20px;}

.entry-content>ul>li:before {
    content: '';
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background-color: #39ba32;
    position: absolute;
    left: 0;
    top: 7px;}

But in the links that are inside these lists the first CSS is not applied, could you tell me how I can make it so that the links of the lists also include the general style of the links of the whole site?

An example:
https://www.banyeresdelpenedes.cat/temes/atencio-ciutadana/

Thank you very much!!

Hi Albert,

You just need to simply change this selector .entry-content p ato .entry-content a, and this .entry-content p a:hover to .entry-content a:hover :)

Can't add some specific tag for the lists? If I remove the "p" the underline appears everywhere, also in the boxes.

Then change this.entry-content p a to .entry-content :is(p,ul) a

This archived topic is closed to new replies.