I would use pseudo-effects with absolute positioning, eliminating the need for additional elements.
Using pseudo effects
Using the previous and: after pseudo-effects, you can make this button without using X :
Live demo
html{ background-color:gray; } .error-circle { width:70px; position:relative; height: 70px; background: #990000; border-radius: 50%; border: 4px solid white; } .error-circle:after,.error-circle:before { position:absolute; content:''; width:10%; left:45%; top:10%; height:80%; background-color:white; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); } .error-circle:before{ -webkit-transform: rotate(45deg); transform: rotate(45deg); }
<div class='error-circle'> </div>
Using pseudo-effects, simplifies editing and management:
In terms of cross-compatibility, you need to make sure that you use the -webkit- prefix -webkit- that the safari -webkit- rotation.
source share