• Services
    • Website Design & Development
    • E-Commerce Shopping Cart Development
    • Website Management
    • Web app & website integration
    • School Website Design
    • Competition Website Design
  • Portfolio
  • Testimonials
  • Contact
  • Blog
  • 01298 816080
  • Menu Menu
You are here: Home1 / Code Snippets2 / WordPress Contact Form 7 – Override CSS

WordPress Contact Form 7 – Override CSS

Code Snippets, Wordpress

This is a tricky one and should be a lot easier than it seems to be.

First you need to add a snippet of code to your functions.php file in your active theme. To disable the contact form 7 style and stop it being appended to your page and overriding your style.

function sk23_remove_contactForm7_css() {
$handle =  'contact-form-7';
wp_deregister_style( $handle );
}
add_action( 'wp_print_styles', 'sk23_remove_contactForm7_css', 100 );

A basic sample CSS to use in your style.css file

div.wpcf7 {
	margin: 0;
	padding: 0;
}

div.wpcf7-response-output {
	padding: 0.2em 1em;
}

div.wpcf7-mail-sent-ok {
	border: 2px solid #398f14;
}

div.wpcf7-mail-sent-ng {
	border: 2px solid #ff0000;
}

div.wpcf7-spam-blocked {
	border: 2px solid #ffa500;
}

div.wpcf7-validation-errors {
	background: #b6ff99;
	float: left;
	color: #30801c;
	border-radius: 5px;
	padding: 15px;
}

span.wpcf7-form-control-wrap {
	position: relative;
}

span.wpcf7-not-valid-tip {
	float:left;
	top: 20%;
	left: 20%;
	z-index: 100;
	background: #fff;
	color:#ff0000;
	font-size: 10pt;
	width: 280px;
	padding: 2px;
}

span.wpcf7-not-valid-tip-no-ajax {
	color: #f00;
	font-size: 10pt;
	display: block;
}

span.wpcf7-list-item {
	margin-left: 0.5em;
}

.wpcf7-display-none {
	display: none;
}

div.wpcf7 img.ajax-loader {
	border: none;
	vertical-align: middle;
	margin-left: 4px;
}

div.wpcf7 .watermark {
	color: #888;
}

div.wpcf7 input {
padding:5px ;border:1px solid #ccc; border-radius: 5px;
}

div.wpcf7 input[type=submit] {
padding:10px 18px ;border:1px solid #ccc; border-radius: 5px;
}

.wpcf7-submit {
	color: #fef4e9;
	border: solid 1px #da7c0c;
	background: #f78d1d;
	background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20));
	background: -moz-linear-gradient(top,  #faa51a,  #f47a20);
	filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20');
}
.wpcf7-submit:hover {
	background: #f47c20;
	background: -webkit-gradient(linear, left top, left bottom, from(#f88e11), to(#f06015));
	background: -moz-linear-gradient(top,  #f88e11,  #f06015);
	filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#f88e11', endColorstr='#f06015');
}
.wpcf7-submit:active {
	color: #fcd3a5;
	background: -webkit-gradient(linear, left top, left bottom, from(#f47a20), to(#faa51a));
	background: -moz-linear-gradient(top,  #f47a20,  #faa51a);
	filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#f47a20', endColorstr='#faa51a');
}
  • Share:
  • Facebook
  • Twitter
  • Pinterest
  • Linkedin
  • Google+
March 27, 2013/by Martin Toner Web Designer Developer
Share this entry
  • Share on Facebook
  • Share on Twitter
  • Share on WhatsApp
  • Share on Pinterest
  • Share on LinkedIn
  • Share on Tumblr
  • Share on Vk
  • Share on Reddit
  • Share by Mail
0 0 Martin Toner Web Designer Developer https://sk23.co.uk/wp-content/uploads/2019/09/sk23logo.svg Martin Toner Web Designer Developer2013-03-27 15:31:492013-06-23 19:36:55WordPress Contact Form 7 – Override CSS

Pages

  • About
  • Blog
  • Competition Website Design
  • Contact
  • E-Commerce Shopping Cart Development
  • Home
  • Magento CE E-Commerce Shopping Cart Web Development
  • Payment Confirmation
  • Payment Failed
  • School Website Design
  • Serious Coding
  • Simple Unlimited Page Website
  • Testimonials
  • Thanks
  • Web app & website integration
  • Website Management
  • Website Design & Development
  • Buxton Web Designer + Developer
  • High Peak Web Designer
  • Recent Web Design Projects Portfolio

Categories

  • Code Snippets
  • Design
  • Fun Stuff
  • Latest Work
  • Magento
  • Magento Guides
  • Magento Modules
  • MySql
  • Our Work
  • PHP
  • PHP Development Work
  • Website work.
  • Wordpress

Archive

  • February 2024
  • February 2023
  • October 2022
  • June 2022
  • August 2019
  • December 2016
  • July 2014
  • April 2014
  • September 2013
  • June 2013
  • March 2013
  • February 2013
  • October 2012
  • May 2012
  • February 2012
  • January 2012
  • October 2011
  • September 2011
  • February 2011
  • January 2011
  • October 2010

Contact Us

If you are looking for a new website , e-commerce store, web application or just some advice please get in touch.

info@sk23.co.uk 01298 816080

Address

SK23Design
Suite 1,
4 Market St,
Chapel-en-le-Frith,
High Peak SK23 0HH

Partners

Recent

  • Magento 2.4 – Why Your Custom Theme’s Css Is Not Being Compiled
  • Magento 2.4 – Change Product Details From Tabs to Accordion On Desktop
  • Magento 2.4 Bulk Updates Not Working Or Appearing In The Action Log
  • Magento 2.4 Disable Page Builder For Category Description
  • Magento 2 UK Shipping

Categories

  • Code Snippets
  • Design
  • Fun Stuff
  • Latest Work
  • Magento
  • Magento Guides
  • Magento Modules
  • MySql
  • Our Work
  • PHP
  • PHP Development Work
  • Website work.
  • Wordpress
  • Web Design High Peak
  • Web Design Buxton
  • Web Designer Chapel-en-le-Frith
  • Loqate
2026 © Copyright - SK23 Design IT - Websites and Web Development Services | Website by SK23Design
Cheshire Kitchens & Bathrooms – New Website For Bathroom Companymr websiteMr Men Fun Scroll to top