-
AuthorPosts
-
June 11, 2014 at 1:18 am #277320
1) I have 2 different background color in different pages. So on dark bg I need white font color. see bottom of this page:
http://gator3130.hostgator.com/~elites/Also I have white bg and I need black font color on that page. see this page:
http://gator3130.hostgator.com/~elites/contact-us/I have added a quick css but it has applied to the whole site. Is there any way to make it?
2) How can I have the contact form labels inside each cell. take a look at this page:
http://artbees.net/themes/jupiter-demo/pages/contact-us-2/Is it possible with Enfold too?
Hey I am not an expert. give me a hand!
June 11, 2014 at 3:30 am #277338Hi afarahani!
Thank you for using the theme!
1.) You can add this on Quick CSS or custom.css to change the label of the contact form to black:
.avia_ajax_form label { color: black !important; }
2.) Yes, that is possible but it will require the core modification of the theme. Edit framework > php > class-form-generator.php, we’ll try to edit the text function inside avia_form class. Look for this code on line 284:
$form_el = ' <input name="'.$id.'" class="text_input '.$element_class.'" type="'.$type.'" id="'.$id.'" value="'.$value.'"/>'; $label = '<label for="'.$id.'">'.$element['label'].$required.'</label>';
Replace it with:
$form_el = ' <input placeholder="'.$element['label'].'" name="'.$id.'" class="text_input '.$element_class.'" type="'.$type.'" id="'.$id.'" value="'.$value.'"/>'; //$label = '<label for="'.$id.'">'.$element['label'].$required.'</label>';
We added the place holder attribute inside the input tag then hide the actual label variable. Do the same thing with the textarea function.
Regards,
IsmaelJune 11, 2014 at 10:03 pm #277737Ismael,
Thanks for the answer. For some reason I wasn’t able to see your reply until 5 min. ago.
The code you gave me didn’t solve my problem! I have 3 contact forms in different part of website:
1) on the bottom of pages with dark background. So I need white label text color : http://gator3130.hostgator.com/~elites/2) on the Contact Us page with white color background. So I need black label text: http://gator3130.hostgator.com/~elites/contact-us/
3) on portfolio pages with white background color. So I need white text labels.
That code doesnt cover all three. The text goes black or white in all pages. Please give me a solution.
June 11, 2014 at 11:38 pm #277804Hi!
You can try pre-fixing the code by the Page ID, for example:
.page-id-12 .avia_ajax_form label { color: white !important; }
Cheers!
JosueJune 12, 2014 at 12:17 am #277831Thanks Josue. Problem solved.
-
AuthorPosts
- The topic ‘Is it possible to have different style for the Contact Form in different pages?’ is closed to new replies.