Archived topic
Adding Lines to Widget Title
5 replies · Started by Clare on February 21, 2018
Viewing posts 1–6 of 6
I want to add lines on either side of the widget title.
It would look something like this:
------ WIDGET TITLE ------
Thank you so much for your help!
Hi there,
What you typed above should work in widget title field. Does it not?
I don't want to add dashes, but a line, similar to the widget titles of this blog:
http://www.kwernerdesign.com
Hi Clare,
Give this a shot:
.widget-title {
position: relative;
z-index: 1;
overflow: hidden;
text-align: center;
}
.widget-title:before,
.widget-title:after {
position: absolute;
top: 51%;
overflow: hidden;
width: 50%;
height: 1px;
content: '';
background-color: red;
margin-left: 10px;
}
.widget-title:before {
margin-left: calc(-50% - 10px);
text-align: right;
}
Like a charm! Thanks Tom!
You're welcome! :)
This archived topic is closed to new replies.