0

How do I replace Type: with Class: using CSS?

<span class="skills">Type:<a href="....../type/aaa/">aaa</a>, <a href="...../type/bbb/">bbb</a></span>
2
  • Maybe this will help you: stackoverflow.com/questions/7896402/… Commented Jun 10, 2022 at 6:57
  • Can't solve my problem, mine has the link Commented Jun 10, 2022 at 7:23

2 Answers 2

2

It's was challenging without updating HTML here's code
It's not perfect but it's works :D

.skills:before {
  content: "Class: ";
  font-size: 14px;

}

.skills {
  font-size: 0;
}
 
.skills a {
  font-size: 14px;
}

.skills a:after {
  content: ", ";
  font-size: 14px;
}
 
<span class="skills">Type:<a href="....../type/aaa/">aaa</a>, <a href="...../type/bbb/">bbb</a></span>

Sign up to request clarification or add additional context in comments.

Comments

0

.skills{font-size:0;}
.skills a{font-size:20px;}
.skills a:after {content: ", "; font-size: 20px;}
.skills a:last-child:after {content: ""; } 
.skills:before {
content: 'Class: ';
font-size:20px;
}
<span class="skills">Type:<a href="....../type/aaa/">aaa</a>, <a href="...../type/bbb/">bbb</a></span>

1 Comment

You have changed HTML structure (moved , inside tag)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.