Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

html css text between Horizontal line

.separator {
  display: flex;
  align-items: center;
  text-align: center;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #000;
}

.separator:not(:empty)::before {
  margin-right: .25em;
}

.separator:not(:empty)::after {
  margin-left: .25em;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #html #css #text #Horizontal #line
ADD COMMENT
Topic
Name
2+2 =