Created
January 10, 2017 12:55
-
-
Save zmts/d4c82513cf432b0a89a89d45bd5b6e10 to your computer and use it in GitHub Desktop.
select2 "required problem" solution
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
<div class="select2-wrapper"> | |
<select required> | |
... | |
</select> | |
</div> | |
<style> | |
.select2-offscreen, | |
.select2-offscreen:focus { | |
clip: rect(0 0 0 0) !important; | |
/* The message is squashed and not seen.*/ | |
/* width: 1px !important;*/ | |
/* height: 1px !important;*/ | |
border: 0 !important; | |
margin: 0 !important; | |
padding: 0 !important; | |
overflow: hidden !important; | |
position: absolute !important; | |
outline: 0 !important; | |
left: 0px !important; | |
top: 0px !important; | |
} | |
.select2-wrapper { | |
position: relative; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment