Last active
April 18, 2018 18:25
-
-
Save markcarrrr/218cc829a205e1a6387952b886547fae to your computer and use it in GitHub Desktop.
Fix for issue in Safari when wanting to use 'position: absolute;' with flexbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Flexbox styles so Safari respects position: relative; on the flex item. | |
*/ | |
.flex-box { | |
display: flex; | |
} | |
.flex-item { | |
display: flex; /* Fixes Safari issue with position: relative; */ | |
flex: 1; | |
flex-direction: column; /* Fixes text not wrapping in IE10 introduced by using display: flex; */ | |
position: relative; | |
} | |
/** | |
* Now you can use position: absolute; within .flex-item | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, my savior :)