Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gravity Forms Image Choices - Polaroid Style 1
.image-choices-field {
max-width: 100%;
margin-right: -3%;
}
.image-choices-field .image-choices-choice,
.gform_wrapper .gfield.image-choices-field li.image-choices-choice {
display: inline-block;
position: relative;
padding: 13px !important;
overflow: visible;
margin-bottom: 80px !important;
border-color: #d8e3ec;
transition: all 0.3s;
border-radius: 3px;
width: 30%;
margin-right: 3% !important;
}
.image-choices-field .image-choices-choice,
.image-choices-field .image-choices-choice.image-choices-choice-hover {
background-color: #f6fbfd;
}
.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%;
top: 60%;
margin: -20px 0 0 -20px;
background-color: #00a7f7;
}
.image-choices-field .image-choices-choice.image-choices-choice-other:after {
top: 70%;
}
.image-choices-field .gfield_label {
font-size: 1.6em;
margin-bottom: 1.6em;
display: block;
}
.image-choices-field .image-choices-choice label,
.gform_wrapper .gfield.image-choices-field li.image-choices-choice label {
padding: 0 !important;
display: block;
}
.image-choices-field .image-choices-choice.image-choices-choice-focus label {
border-color: #00a7f7;
}
.image-choices-field .gfield_radio .image-choices-choice.image-choices-choice-focus.image-choices-choice-selected label {
border-color: transparent;
}
.image-choices-field .image-choices-choice-image-wrap {
background-size: cover;
width: 100%;
height: auto;
padding-bottom: 100%;
}
.image-choices-field.image-choices-show-labels .image-choices-choice-text {
padding: 7px 13px;
margin: 0;
position: absolute;
width: 100%;
left: 50%;
transform: translateX(-50%);
border-radius: 20px;
bottom: -50px;
transition: all 0.3s;
}
.image-choices-field.image-choices-show-labels .image-choices-choice-text,
.image-choices-field.image-choices-show-labels .image-choices-choice-price {
font-size: inherit;
}
.image-choices-field .image-choices-choice.image-choices-choice-selected,
.image-choices-field .image-choices-choice.image-choices-choice-selected.image-choices-choice-hover {
box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.2);
border-color: #00a7f7;
background-color: #fff;
}
.image-choices-field .image-choices-choice.image-choices-choice-selected:after {
color: #fff;
opacity: 1;
top: 50%;
}
.image-choices-field .image-choices-choice.image-choices-choice-other.image-choices-choice-selected:after {
top: 60%;
}
.image-choices-field .image-choices-choice.image-choices-choice-selected .image-choices-choice-text {
background-color: #00a7f7;
color: #fff;
}
@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