I am trying to divide part of my page and center an icon between two divider lines. I figure I have to use ::before
and ::after
, so I wrote this
i:after {
background-color: #999;
content: " ";
display: inline-block;
height: 3px;
margin: 0 0 8px 20px;
text-shadow: none;
width: 100%;
}
i:before {
background-color: #999;
content: " ";
display: inline-block;
height: 3px;
margin: 0 20px 8px 0;
text-shadow: none;
width: 100%;
}
In jsfiddle it doesn't seem to work at all. But when I open the index file in chrome it works to a point. It will show a line to the left and right of the icon, but it won't have it fill the whole body div. Any ideas would be great.