Reputation: 7145
I have the following HTML:
.arrow {
width: 50px;
position: fixed;
}
.arrow.arrow-right {
top: 0;
bottom: 0;
margin: auto;
right: 15px;
}
.arrow.arrow-bottom {
left: 0;
right: 0;
margin: auto;
bottom: 15px;
transform: rotate(90deg);
}
<img src="http://bestanimations.com/Signs&Shapes/Arrows/Left/left-arrow-15.gif" class="arrow arrow-bottom" />
<img src="http://bestanimations.com/Signs&Shapes/Arrows/Left/left-arrow-15.gif" class="arrow arrow-right" />
And I expect the first arrow to apear near the right edge of the screen, and the second one near the bottom of the screen.
This is exactly what happens in Chrome, Firefox and Opera:
In Edge, it seems that the 'bottom' rule is just.. ignored:
Why is this happening?
Upvotes: 0
Views: 617
Reputation: 1876
Just change to the following:
.arrow.arrow-bottom {
left: 0;
right: 0;
margin: 0 auto; /* instead of auto */
bottom: 15px;
transform: rotate(90deg);
}
The margin: auto
was causing the issue. Please let me know if it solved the issue or not.
Upvotes: 3