Last active
July 6, 2019 02:36
-
-
Save jetsloth/2dcbf816e31731c46e9d42baf91bb660 to your computer and use it in GitHub Desktop.
Gravity Forms Image Choices - Shadow Box Style 1
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
.image-choices-field { | |
display: block; | |
max-width: 100%; | |
width: 100%; | |
} | |
.image-choices-field .gfield_label { | |
font-size: 2em; | |
margin-bottom: 1em; | |
display: block; | |
text-align: center; | |
} | |
.image-choices-field, | |
.gform_wrapper .gfield.image-choices-field { | |
margin-right: -10%; | |
} | |
.image-choices-field .image-choices-choice, | |
.gform_wrapper .gfield.image-choices-field li.image-choices-choice { | |
position: relative; | |
text-align: center; | |
padding: 20px 20px 70px !important; | |
margin-bottom: 50px !important; | |
vertical-align: middle; | |
transition: all 0.3s; | |
border-radius: 6px; | |
border: 1px solid transparent !important; | |
width: 40%; | |
max-width: 280px; | |
margin-right: 10% !important; | |
overflow: visible; | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-other input[type="text"] { | |
top: 40%; | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-focus { | |
border-color: #ff584c !important; | |
} | |
.image-choices-field .gfield_radio .image-choices-choice.image-choices-choice-focus.image-choices-choice-selected { | |
border-color: #fff !important; | |
} | |
.image-choices-field .image-choices-choice label, | |
.gform_wrapper .gfield.image-choices-field li.image-choices-choice label { | |
padding: 0 !important; | |
display: block; | |
border: none !important; | |
} | |
.image-choices-field .image-choices-choice:after { | |
content: "\2714" !important; | |
width: 40px; | |
height: 40px; | |
overflow: hidden; | |
border-radius: 50%; | |
pointer-events: none; | |
opacity: 0; | |
transition: all .3s; | |
text-align: center; | |
line-height: 40px; | |
color: #fff; | |
display: block; | |
position: absolute; | |
left: 50%; | |
margin: -20px 0 0 -20px; | |
top: auto; | |
bottom: -40px; | |
background-color: #ff584c; | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-selected { | |
box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.2); | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-selected:after { | |
color: #fff; | |
opacity: 1; | |
} | |
.image-choices-field .image-choices-choice, | |
.image-choices-field .image-choices-choice.image-choices-choice-hover, | |
.image-choices-field .image-choices-choice.image-choices-choice-selected { | |
border-color: transparent !important; | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-hover { | |
background-color: transparent !important; | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-selected { | |
background-color: #fff !important; | |
box-shadow: 0 0 40px 0 rgba(0,0,0,.1); | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-selected .image-choices-choice-text { | |
color: #ff584c; | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-selected:after { | |
bottom: -20px; | |
} | |
.image-choices-field .image-choices-choice-image-wrap { | |
border: none; | |
width: 100%; | |
height: auto; | |
padding-bottom: 100%; | |
background-color: transparent; | |
background-size: contain; | |
} | |
.image-choices-field.image-choices-show-labels .image-choices-choice-text { | |
font-size: inherit; | |
position: absolute; | |
left: 50%; | |
transform: translateX(-50%); | |
bottom: 30px; | |
width: 100%; | |
transition: all 0.3s; | |
} | |
@media only screen and (max-width: 736px) { | |
.image-choices-field .image-choices-choice, | |
.gform_wrapper .gfield.image-choices-field li.image-choices-choice { | |
width: 48%; | |
margin-right: 2% !important; | |
} | |
} | |
@media only screen and (max-width: 480px) { | |
.image-choices-field .image-choices-choice, | |
.gform_wrapper .gfield.image-choices-field li.image-choices-choice { | |
width: 98%; | |
margin-right: 2% !important; | |
} | |
} | |
/* | |
Find out more at | |
https://jetsloth.com/gravity-forms-image-choices/ | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment