I created an X button using CSS only. It displays fine in all browsers besides on ie11. In ie11 the button stacks over a border but when it's clicked it moves slightly down to the correct place it's suppose to be. I have no clue on how to fix this and have tried a bunch of different ways. This code is scss btw.
button {
width: 50px;
height: 50px;
right: 15px;
top: 15px;
padding: 0;
position: absolute;
border: none;
background-color: transparent;
&:hover { cursor: pointer; }
&:before, &:after {
content: '';
width: 100%;
height: 2px;
background-color: blue;
display: block;
position: absolute;
}
&:before {
-webkit-transform: rotateZ(45deg);
-moz-transform: rotateZ(45deg);
-ms-transform: rotateZ(45deg);
transform: rotateZ(45deg);
}
&:after {
-webkit-transform: rotateZ(-45deg);
-moz-transform: rotateZ(-45deg);
-ms-transform: rotateZ(-45deg);
transform: rotateZ(-45deg);
}
}
}