Skip to content

Instantly share code, notes, and snippets.

@cfxd
Created October 6, 2014 06:42
Show Gist options
  • Save cfxd/a76ab30bc85ccd2d1316 to your computer and use it in GitHub Desktop.
Save cfxd/a76ab30bc85ccd2d1316 to your computer and use it in GitHub Desktop.
Bootstrap 3 inline form for Contact Form 7 (only tested with 1 input field and 1 submit button)
/*
*
* Bootstrap 3 inline form for Contact Form 7
*
* In the shortcode, you must use html_id="my-id"
* or html_class="my-class" to target a specific form
*
* Actual form sample:
* <label for="your-email">Email:</label>
* [email* your-email 0/ placeholder "enter your email"]
* <span><button type="submit" class="wpcf7-form-control">Submit</button></span>
*
* Example 1 (affects targeted form class only): .my-form-class { &:extend(.cf7_inline all); }
*
* Example 2 (affects all Contact Form 7 forms): .wpcf7-form { &:extend(.cf7_inline all); }
*
*/
.cf7_inline {
& .wpcf7-form-control-wrap {
&:extend(.form-inline .form-group, .form-group);
> input {
&:extend(.form-inline .form-control);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment