Reputation: 197
I am using Contact Form 7 for a form in a right column on this page http://ernielovespizza.com/get-in-touch/
It looks fine on desktop/tablet but on mobile the "NAME" and "EMAIL" fields extend past the screen on the right but the "MESSAGE" field is fine.
Does anyone know why this happens and what a fix could be?
This is my form code:
<label> Your Name (required)
[text* your-name] </label>
<label> Your Email (required)
[email* your-email] </label>
<label> Your Message
[textarea your-message] </label>
[submit "Send"]
At the moment I don't have any specific CSS for it. I used Visual Composer to build the website also.
Upvotes: 3
Views: 11040
Reputation: 2133
Short answer: add "width: 100%;" line to the CSS selector of "input, textarea, select, .seldiv, .select2-choice, .select2-selection--single".
Long answer: here are some steps to follow using Chrome's Inspect function to figure out this display problem.
Also, explore different options in Chrome's Inspect tool; it is very useful for diagnosing display issues and trying out solutions before doing any CSS edits.
Good luck.
Upvotes: 3
Reputation: 330
Assuming the input type is text (change it as necessary). This code will do the trick,
<style>
input[type=text]
{
/* change as necessary */
max-width:500px;
min-width:250px;
/* this will resize input box if width between 500-250 */
width:100%;
}
</style>
Upvotes: 0
Reputation: 67778
You can add this rule to your custom CSS:
.wpcf7 input {
max-width: 100% !important;
}
You might not need the !important
(try it without that first), but if it doesn't work without that, add it.
Upvotes: 7