Extra Line Breaks in Contact Form 7

Problem:

I added the Contact Form 7 wordpress plugin and created my form.  I created it with no line breaks whatsoever.  It looked like this:

<span>Name</span><span>[text* contact-name]</span><span>Email</span><span>[email* contact-email]</span><span>Message</span><span>[textarea* contact-message x4]</span>[submit “Submit”]

However, on the page, I had <br> tags after Name and each of the labels.  WHY?

 

Solution:

Apparently WPCF7_AUTOP function in the plugin automatically adds the br tag.  The best solution is to add a style to hide the br in the form:

 

.wpcf7-form-control-wrap br { display: none; }

The rest of the solutions are found here:

http://www.alvaronicardo.com/remove-line-break-from-contact-form-7/

keywords:  contact form 7 extra break line

Posted in Coding Tagged with: ,

Leave a Reply