Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Form 2 columns on desktop, 1 on mobile
New Landing › How can we help? › Themeforest Theme Support › Dante › Form 2 columns on desktop, 1 on mobile
- This topic has 21 replies, 2 voices, and was last updated 8 years by Kyle – SUPPORT.
-
Posted in: Dante
-
January 15, 2016 at 2:22 pm #240810
Hello,
I’ve built the form properly on desktop, but it remains on 2 columns on mobile. What did I do wrong?
Thanks for your help!
Nice dayJanuary 15, 2016 at 2:39 pm #240816Hi
You have this in your custom css:
.wpcf7 form.wpcf7-form p.firstname,
.wpcf7 form.wpcf7-form p.name,
.wpcf7 form.wpcf7-form p.phone,
.wpcf7 form.wpcf7-form p.email,
.wpcf7 form.wpcf7-form p.company,
.wpcf7 form.wpcf7-form p.jobtitle,
.wpcf7 form.wpcf7-form p.country2,
.wpcf7 form.wpcf7-form p.city,
.wpcf7 form.wpcf7-form p.sector {
float:left;
width:47%;
}
.wpcf7 form.wpcf7-form p.subject,
.wpcf7 form.wpcf7-form p.country,
.wpcf7 form.wpcf7-form p.need,
.wpcf7 form.wpcf7-form p.experience,
.wpcf7 form.wpcf7-form p.exp-type,
.wpcf7 form.wpcf7-form p.sector2,
.wpcf7 form.wpcf7-form p.motivations,
.wpcf7 form.wpcf7-form p.message,
.wpcf7 form.wpcf7-form p.cv {
float:right;
width:47%;
}You should put it in a media query:
@media only screen and (min-width: 768px) { .wpcf7 form.wpcf7-form p.firstname, .wpcf7 form.wpcf7-form p.name, .wpcf7 form.wpcf7-form p.phone, .wpcf7 form.wpcf7-form p.email, .wpcf7 form.wpcf7-form p.company, .wpcf7 form.wpcf7-form p.jobtitle, .wpcf7 form.wpcf7-form p.country2, .wpcf7 form.wpcf7-form p.city, .wpcf7 form.wpcf7-form p.sector { float:left; width:47%; } .wpcf7 form.wpcf7-form p.subject, .wpcf7 form.wpcf7-form p.country, .wpcf7 form.wpcf7-form p.need, .wpcf7 form.wpcf7-form p.experience, .wpcf7 form.wpcf7-form p.exp-type, .wpcf7 form.wpcf7-form p.sector2, .wpcf7 form.wpcf7-form p.motivations, .wpcf7 form.wpcf7-form p.message, .wpcf7 form.wpcf7-form p.cv { float:right; width:47%; } }
– Kyle
January 15, 2016 at 2:49 pm #240818Thanks a lot Kyle, I’ve learnt something today!
Nice WE!January 15, 2016 at 2:53 pm #240819No problem 🙂
January 15, 2016 at 2:54 pm #240820Ah one thing I’ve just noticed, the fields are not in the right order : I wanted all the left fields first and then the right fields.
Here, I have left, right, left right, so the “message” fields is before “your job or your title”.
Can I fix this easily?January 15, 2016 at 2:56 pm #240821It will be in the order you have set them up in the form. You will need to create 2 divs (columns), for left and right, and float them left and right instead of the input fields
– Kyle
January 15, 2016 at 2:58 pm #240823OK will try this, thanks!
January 15, 2016 at 3:08 pm #240828I’ve put this :
<div class=contact-left"> <p class="name">Nom *<br /> [text* your-name] </p> <p class="firstname">Prénom *<br /> [text* your-first-name] </p> <p class="email">Email *<br /> [email* your-email] </p> <p class="phone">Téléphone<br /> [text your-phone] </p> <p class="company">Société<br /> [text your-company] </p> <p class="jobtitle">Fonction<br /> [text your-jobtitle] </p> </div> <div class="clear"></div> <div class=contact-right"> <p class="subject">Sujet<br /> [text your-subject] </p> <p class="message">Message *<br /> [textarea* your-message] </p> </div> <div class="clear"></div> <p class="submission">[submit "Envoyer"]</p>
and
@media only screen and (min-width: 768px) { .contact-left { float:left; width:47%; } .contact-right { float:right; width:47%; } }
It’s OK on mobile but on 3 columns on desktop 🙁
January 15, 2016 at 3:09 pm #240829Sorry, I did the “test” on this URL : trustin.io/contact
January 15, 2016 at 3:10 pm #240830You still have your previous css with floating the inputs, you need to remove that
– Kyle
January 15, 2016 at 3:11 pm #240832I don’t understand your answer, what do I have to remove?
January 15, 2016 at 3:14 pm #240833Remove this:
@media only screen and (min-width: 768px) { .wpcf7 form.wpcf7-form p.firstname, .wpcf7 form.wpcf7-form p.name, .wpcf7 form.wpcf7-form p.phone, .wpcf7 form.wpcf7-form p.email, .wpcf7 form.wpcf7-form p.company, .wpcf7 form.wpcf7-form p.jobtitle, .wpcf7 form.wpcf7-form p.country2, .wpcf7 form.wpcf7-form p.city, .wpcf7 form.wpcf7-form p.sector { float:left; width:47%; } .wpcf7 form.wpcf7-form p.subject, .wpcf7 form.wpcf7-form p.country, .wpcf7 form.wpcf7-form p.need, .wpcf7 form.wpcf7-form p.experience, .wpcf7 form.wpcf7-form p.exp-type, .wpcf7 form.wpcf7-form p.sector2, .wpcf7 form.wpcf7-form p.motivations, .wpcf7 form.wpcf7-form p.message, .wpcf7 form.wpcf7-form p.cv { float:right; width:47%; } }
– Kyle
January 15, 2016 at 3:17 pm #240835It’s already removed, I’ve replace it by :
@media only screen and (min-width: 768px) { .contact-left { float:left; width:47%; } .contact-right { float:right; width:47%; } }
January 15, 2016 at 3:21 pm #240839Ahh, it’s your html, you’ve put:
instead ofsame for contact-right
– Kyle
January 15, 2016 at 3:26 pm #240844Yep, I’ve just seen I’ve forgot the ” before contact-left.
It’s OK for the 2 columns but on desktop, my background is not OK, it’s only applied on 1 cm, and *champs obligatoires” neither, it should be at the bottom (= mandatory fields in french) -
Posted in: Dante
You must be logged in and have valid license to reply to this topic.