And here’s a screencast to show you how the settings are made:
loom(dot)com(slash)share(slash)89b40de32c7e461492098f75dc82a474
(Sorry, my member privileges are not enough for me to share links yet)
The “element” is the field input portion that I’m trying to use CSS on. I tried naming it “lastname” under the element field (which is supposed to “add an extra class to your field element”). Then I use the following:
@media only screen and (max-width: 768px) {
/* For mobile phones: */
.lastname {
width: 90vw;
}
@media screen and (min-width: 768px) {
/* tablets: */
.lastname {
width: 75vw;
}
@media screen and (min-width: 992px) {
/* desktops: */
.lastname {
width: 50vw;
}
It didn’t work. Then I tried doing this:
@media only screen and (max-width: 768px) {
/* For mobile phones: */
#lastname {
width: 90vw;
}
@media screen and (min-width: 768px) {
/* tablets: */
#lastname {
width: 75vw;
}
@media screen and (min-width: 992px) {
/* desktops: */
#lastname {
width: 50vw;
}
It didn’t work too. Then after inspecting element, I tried this:
@media only screen and (max-width: 768px) {
/* For mobile phones: */
input#nf-field-19.ninja-forms-field.nf-element {
width: 90vw;
}
@media screen and (min-width: 768px) {
/* tablets: */
input#nf-field-19.ninja-forms-field.nf-element {
width: 75vw;
}
@media screen and (min-width: 992px) {
/* desktops: */
input#nf-field-19.ninja-forms-field.nf-element {
width: 50vw;
}
and this:
@media only screen and (max-width: 768px) {
/* For mobile phones: */
#nf-field-19.ninja-forms-field.nf-element {
width: 90vw;
}
@media screen and (min-width: 768px) {
/* tablets: */
#nf-field-19.ninja-forms-field.nf-element {
width: 75vw;
}
@media screen and (min-width: 992px) {
/* desktops: */
#nf-field-19.ninja-forms-field.nf-element {
width: 50vw;
}
All the above didn’t work…