CSS for styling form background color
-
I know I’m going to have to give myself a slap when I find out the answer but I’ve tried every which way to change the background color of my form background and come up empty every time.
My form has four fields/trs and for reasons I can’t fathom the tr backgrounds have alternating #ffffff and #f8f8f8. The input fields themselves are all #ffffff which is fine but I want to color the whole of the form background to match my page color which is #fafafa.
So far, I have tried, and failed, to target
form
table
tbody
and each individualtr
(as a class and by each given ID, egcf-email
So far, my CSS works fine but what do I need to add to this to color the form background?
/* Testimonial form field mods */ .hms-testimonials-form input[type="text"], .hms-testimonials-form input[type="email"], .hms-testimonials-form textarea { margin-left: -50%; background: #ffffff; font-family: Trebuchet MS, sans-serif; font-weight: 800; color: #8f48e2; } .hms-testimonials-form input[type="submit"] { margin-left: -50%; font-family: Trebuchet MS, sans-serif; background: #8f48e2; } .hms-testimonials-form input[type="text"], .hms-testimonials-form input[type="email"] { width: 99%; }
Thanks for any help. The site is offline unfortunately so I can’t provide a link.
- The topic ‘CSS for styling form background color’ is closed to new replies.