Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Placeholder mobile customization
This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko 8 years, 7 months ago.
- AuthorPosts
- September 1, 2015 at 1:23 pm #5737
Hi,
On plugin menu: Theme options I use Font size: 20px and line-height: 25px and is Ok for Desktop devices.
For mobile I want to use default plugin settings: font-size: 12px and line-height: 15px.
So in my theme style.css I use:@media only screen and (max-width: 980px) {
input.orig {
font-size: 12px!important;
line-height: 15px!important;
}}I inspect element on chrome and I do not understand why does not working.(see attached screenshot).
Can you please provide me the CSS for mobile to have default placeholder font size and line-height? 12px; 15px?
Thanks in advance!Attachments:
You must be logged in to view attached files.September 1, 2015 at 1:33 pm #5739Hi!
I think the placeholder text needs a different rule for CSS3 supported browsers.
Try something like:
Best,@media only screen and (max-width: 980px) { input.orig, input.orig::-webkit-input-placeholder, input.orig:-moz-placeholder, input.orig::-moz-placeholder, input.orig:-ms-input-placeholder { font-size: 12px !important; line-height: 15px !important; } }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 1, 2015 at 1:41 pm #5741I think somewhere is a bug because: The settings are applied(far as I see in chrome inspected element) but visual the font size remain 20px.
See attached picture!
Other solution?
Thanks in advance!
Attachments:
You must be logged in to view attached files.September 1, 2015 at 1:47 pm #5743I have no idea, the rule seems to apply correctly as the inspector tells. It doesn’t seem there is anything conflicting either. I just tried on my test environment, but I was able to change the placeholder text with that rule.
Do you have an url where I can see this?
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 1, 2015 at 2:08 pm #5744Yes!
But is private, not live yet.
Where I can give you user/pass private?September 1, 2015 at 2:13 pm #5745You can edit the first post in this thread and add the private details, or upload a txt file with them. Both are safe, and visible only for me and you.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 1, 2015 at 2:23 pm #5746attached.
Search form is on homepage.
Theme custom css: dashboard divi-> theme options (page down) – first is your code for mobile.
Attachments:
You must be logged in to view attached files.September 1, 2015 at 3:01 pm #5748Okay, I think I found it. So I googled a bit, and it seems like that each placeholder must have a separate rule, otherwise it won’t work. Strangest thing I have ever seen. So the final solution is:
Best,@media only screen and (max-width: 980px) { input.orig{ font-size: 12px !important; line-height: 15px !important; } input.orig::-webkit-input-placeholder { font-size: 12px !important; line-height: 15px !important; } input.orig:-moz-placeholder { font-size: 12px !important; line-height: 15px !important; } input.orig::-moz-placeholder { font-size: 12px !important; line-height: 15px !important; } input.orig:-ms-input-placeholder { font-size: 12px !important; line-height: 15px !important; } }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.