I\'m trying to achieve something similar to this picture:

I have an im
Assuming your element is not an If you cannot change the line-height of the div, another way is: Otherwise, just place the indicators as a background in center position. (because pseudo elements are not allowed on self-closing elements), let's suppose it's a div {
height: 100px ;
line-height: 100px;
}
div:before, div:after {
content: "";
...
display: inline-block;
vertical-align: middle;
height: ...;
line-height: normal;
}
div {
position: relative;
}
div:before, div:after {
position: absolute;
display: block;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
content: "";
width: ...
}