html - Pseudo-elements :before & :after not working in IE 10 or 11 -
in edge, google chrome , firefox code works fine in ie show after , not before either side of heading 2 tag.
clear achievable strategy
h2 { color: #333333; font-family: 'lato', sans-serif; position: relative; font-size: 30px; padding: 0 10px 0 10px; z-index: 1; overflow: hidden; text-align: center;} h2:before, h2:after { position: absolute; top: 51%; overflow: hidden; width: 18%; height: 1px; content: '\a0'; background-color: #333333; } h2:before { margin-left: -20%; text-align: right; } h2:after { margin-left: 2%; text-align: right; }
Comments
Post a Comment