- This topic has 7 replies, 3 voices, and was last updated 8 years, 6 months ago by
Tom.
-
AuthorPosts
-
February 18, 2015 at 7:13 am #76244
Lim Siong Boon
Hi Tom,
I am having difficulty trying to customise the search field to bring it next to the search icon on the navigation bar.
My navigation search button is at the end of the navigation bar on the far right.
The original behavior when the search button is click is that the whole navigation will turned into a search field.I have customised the navigation bar height.
Now when I clicked on the search button, a search field will appeared but it is at the far left of the navigation bar.This is my website, http://www.pic-control.com/
Appreciate if you can advise me if it is possible to make the search bar the same height as me new navigation menu height.
Thank you.
February 18, 2015 at 12:30 pm #76360Tom
Lead DeveloperLead DeveloperHi there,
When using Generate Spacing, all of these values are updated automatically.
Without Generate Spacing, you’ll need to match the height of the navigation search with the navigation.
So this should do it:
.navigation-search { height: 30px; }
March 6, 2015 at 10:52 pm #83577Siong Boon Lim
Hi Tom, I have “Generate Spacing”. How to do it with generate spacing?
March 6, 2015 at 11:58 pm #83589Tom
Lead DeveloperLead DeveloperIt will happen automatically – the search navigation takes on your menu height setting, so you shouldn’t have to do anything at all.
March 7, 2015 at 8:29 am #83685Siong Boon Lim
I got it. Erase my CSS configuration and set the height using the “Generate Spacing”.
May I know how do I shift the search bar to the right, next to the cancel cross button.
Currently it is at the far left hand left.
I would like my menu to be remain seen instead of being blocked by the search bar.Also how do I change the search bar color from dark gray to another color?
Thank you.
March 7, 2015 at 1:12 pm #83816Tom
Lead DeveloperLead DeveloperYou can change the width of the search with this CSS:
.navigation-search { max-width: 300px; }
Change the 300px to whatever you like.
To change the color, you can use this:
.navigation-search input[type="search"], .navigation-search input[type="search"]:active { background-color: #3f3f3f; color: #FFF; } .navigation-search input[type="search"], .navigation-search input[type="search"]:active { background-color: #3f3f3f; color: #ffffff; }
March 7, 2015 at 5:02 pm #83881Siong Boon Lim
Hi Tom,
Thanks. I managed to get the width correct. The bar shorten to the right which does exactly what I wanted.
The color customisation couldn’t work.
I managed to figure out the following from your example which works for me,.navigation-search input[type=”search”], .navigation-search input[type=”search”]:focus {
background: #AFA;
color: #FFF;
}Thank you for your help.
March 8, 2015 at 10:23 am #84025Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.