Labeled horizontal rule

Hi

  1. Create new role and name it HR (for example) and restrict to a Label
    Π‘Π½ΠΈΠΌΠΎΠΊ экрана 2023-07-09 Π² 15.51.29

  2. Create css rule and put at theme.css

.anvil-role-hr.anvil-label {
  display: flex;
  flex-direction: row;
}
.anvil-role-hr.anvil-label:before, .anvil-role-hr.anvil-label:after{
  content: "";
  flex: 1 1;
  border-bottom: 2px solid;
  margin: auto;
}
.anvil-role-hr.anvil-label:before {
  margin-right: 10px
}
.anvil-role-hr.anvil-label:after {
  margin-left: 10px
}

Now I can apply role hr to Label
Π‘Π½ΠΈΠΌΠΎΠΊ экрана 2023-07-09 Π² 16.00.26

an see result like this

3 Likes

(I hope you don’t mind: I made your comment a new post since it seemed sufficiently independent from the preceding context.)

Welcome to the forum! :wave:

And thanks for sharing. I’ll likely be using this soon.

2 Likes