Site logo

Archived topic

Possible to create a line like this using CSS?

3 replies · Started by William on September 18, 2021

Viewing posts 1–4 of 4

Hi William,

The example site is using this css:

.c-entry-group-labels__item:before {
    border-right: 1px solid;
    border-top: 1px solid;
}
.c-entry-group-labels__item:before {
    background: transparent;
    content: "";
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    -webkit-transform: skewX(
25deg);
    transform: skewX(
25deg);
    width: 100%;
    z-index: -1;
}

You just need to replace the .c-entry-group-labels__item with your own CSS selectors.

Thank you, Ying!

Can I just make up my own CSS selector? Does it matter what I call it?

Hi William,

It has to match the class of the element for the line to apply.

Say, for example, the element you want to apply this on has an attribute class="post-meta".

You'll have to change .c-entry-group-labels__item with .post-meta.

This archived topic is closed to new replies.