Title: Please remove span wrapping !
Last modified: August 31, 2016

---

# Please remove span wrapping !

 *  [BenM](https://wordpress.org/support/users/alysko/)
 * (@alysko)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/)
 * Hi,
 * All element on CF7 are wrap into span.wpcf7-form-control-wrap.
 * It’s a very bad idea because parent selector doesn’t exist in CSS. So, it’s impossible
   to style any element when input is focused.
 * Thereby, no solution to add nice CSS animation.
 * Thanks.
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-7114641)
 * See [Styling Contact Form](http://contactform7.com/styling-contact-form/)
 *  Thread Starter [BenM](https://wordpress.org/support/users/alysko/)
 * (@alysko)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-7114748)
 * The problem is not CSS, the problem is your span wrapping !
 * Re-read my message. It’s impossible, for now, to style label when input is focused
   because you wrap input in span.
 * `<span><input></span><label>`
 * In CSS3, you **can’t** reach <label> when <input> is focused.
 *  [sebastianlaube](https://wordpress.org/support/users/sebastianlaube/)
 * (@sebastianlaube)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-7114926)
 * *bump*
 * At the moment this problem is not solved and it is really necessary to provide
   a semantic and mindful markup.
 * Please remove the spans around form elements so that the label can be addressed
   by CSS. Or at least tell us, what’s the idea behind this markup.
 * If your in trouble with time, please provide information about contributing.
 * Tanks.
 *  [tameroski](https://wordpress.org/support/users/tameroski/)
 * (@tameroski)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-7114927)
 * +1 on that one.
    Adding a filter to the fields output would be great.
 *  [Rob_Huska](https://wordpress.org/support/users/rob_huska/)
 * (@rob_huska)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-8155573)
 * I too have had issues with this. I am unable to use selectors like `+`, `~`, 
   or `>` because the `<span>` wrappers. Is there anything at all that we can do
   to remove these? Please don’t just link to “Styling Contact Form”.
 * Thanks
 *  [Head Goldfish](https://wordpress.org/support/users/shoelaced/)
 * (@shoelaced)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-8165575)
 * YES, please remove the `<span>` wrappers! What a headache it is when stuff like
   that is added automatically. If I wanted wrappers I’d put them in the plugin 
   backend like all the rest of the form code. Is there any sort of possible timeline
   for this for a future update? Or is there a way to unhook that now?
 *  [Head Goldfish](https://wordpress.org/support/users/shoelaced/)
 * (@shoelaced)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-8165760)
 * Hey all,
 * If you’re using jQuery, here’s a solution that I’ve gotten working. Please note
   though that apparently the validation errors for the individual fields (“Please
   fill the required field” etc.) require the span wrap, so those don’t show up.
   The error at the bottom still does though.
 *     ```
       <script>
        $(document).ready(function(){
            $("input.customclass").unwrap();
        });
        </script>
       ```
   
 * Just add a custom class to the inputs that you don’t want wrapped.
 *  [tatsumisuzuki](https://wordpress.org/support/users/tatsumisuzuki/)
 * (@tatsumisuzuki)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-8226317)
 * Yes, please!
    Also the `br` line breaks.
    -  This reply was modified 9 years, 8 months ago by [tatsumisuzuki](https://wordpress.org/support/users/tatsumisuzuki/).
 *  [jargillander](https://wordpress.org/support/users/jargillander/)
 * (@jargillander)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-8239879)
 * Same here, I’ve also had issues with the span wrapping. Please, remove the wrappers!
 *  [Aminta](https://wordpress.org/support/users/aminta/)
 * (@aminta)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-8335123)
 * I would add to earlier requests, please remove the <span> tag, and thanks for
   your wonderful plugin!
 *  [niaccurshi](https://wordpress.org/support/users/niaccurshi/)
 * (@niaccurshi)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-8350643)
 * Yes, please, at least allow for a checkbox or something to not add all this extra
   mark up. I don’t need the plugin presuming that I need spans or paragraphs or
   breaks!
 *  [l1s](https://wordpress.org/support/users/l1s/)
 * (@l1s)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-8609149)
 * I have edited this `<span class="wpcf7-form-control-wrap %1$s"><input %2$s />%
   3$s</span>` to `<input %2$s />` in modules/text.php and span
    -  This reply was modified 9 years, 5 months ago by [l1s](https://wordpress.org/support/users/l1s/).
 *  [michstar](https://wordpress.org/support/users/michstar/)
 * (@michstar)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-8694945)
 * Bump, good work on the plugin but are you planning to honor this request?

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Please remove span wrapping !’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 13 replies
 * 12 participants
 * Last reply from: [michstar](https://wordpress.org/support/users/michstar/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/please-remove-span-wrapping/#post-8694945)
 * Status: not resolved