Forums / General Questions / Trying to add Expandable Search bar in header

Trying to add Expandable Search bar in header

Views: 866

Results 1 to 2 of 2
24 Dec 2012, 2:02 AM
#1
phillycheese123 avatar

phillycheese123

New Zenner

Join Date:
Dec 2011
Posts:
11
Plugin Contributions:
0

Trying to add Expandable Search bar in header

I would like to edit either the search sidebox or the search header css to make it expand when clicked inside ....like so http://www.cibgraphics.com/blog/article/create_an_expandable_search_form

my problem is the only css i can find for the search bar is

#navMainSearch { }

all the styling is controlled within the php.

Is there someway of having the style controlled within the css so that i can add the behaviour im talking about?

Thanks for your help, Zencart is the sh@it

edit**my bad form,select, input is in the css but that is general..affecting more than the search bar
-Phil

24 Dec 2012, 4:36 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Trying to add Expandable Search bar in header

So use a selector like #navMainSearch input {what: ever;} to limit the styling to the search bar elements. And if there is styling inline that you want to change, add !important to your custom declaration and it will override the inline styling.

In any case, you can't cause CSS treatment to change on click; that takes javascript. CSS can change styling (such as expanding a box) when you hover your mouse over an element.