Reputation: 3
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>
Upvotes: 0
Views: 105
Reputation: 1634
.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>
Upvotes: 0
Reputation: 2914
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>
Upvotes: 2