Jump to content

how to do this for search box? solved!


Recommended Posts

i want to put an text like "search" inside box of searching bar, and a image instead of "search" button from default theme, for the text i found a post talking about this but was for PS 1.4.... and for the image i guess i have to put a background on .css with an image?

post-716586-0-30668700-1389039374_thumb.png

Edited by haochen (see edit history)
Link to comment
Share on other sites

can you tell me how to add this code exactly please

 

Sure.

 

In blocksearch-top.tpl find the following

<input class="search_query" type="text" id="search_query_top" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|htmlentities:$ENT_QUOTES:'utf-8'|stripslashes}{/if}" />

Then add the code above like this

<input class="search_query" type="text" id="search_query_top" name="search_query" placeholder="Search..." value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|htmlentities:$ENT_QUOTES:'utf-8'|stripslashes}{/if}" />

That should do it.

 

Marty Shue

Link to comment
Share on other sites

check this tool: http://border-radius.com/ use these styles for your serach box :)

 

for example:

#search_block_top #search_query_top {
padding: 0 5px;
height: 23px;
width: 300px;
border: 1px solid #666;
border-right: 0 !important;
color: #666;
background: url(img/bg_search_input.png) repeat-x 0 0 #fff;
float: left;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
  • Like 1
Link to comment
Share on other sites

hi vekia, i tested these 3 options already on Firezilla inside of #search_block_top #search_query_top {, but it seems not the right way to change this >.<

 

Because another CSS rule is overriding it.

 

You will need to do this

-moz-border-radius:5px 0px 0px 5px!important;
-webkit-border-radius:5px 0px 0px 5px!important;
border-radius:5px 0px 0px 5px!important;

That should solve your problem.

 

Marty Shue

Link to comment
Share on other sites

closest? hmmm

 

as far as i know, when you will use several the same instances of class, for example in global.css

 

at the begining of the file:

.myclass {
height:200px!important;
}

in the middle:

.myclass {
height:400px!important;
}

at the end:

.myclass {
height:500px!important;
}

only last style will be applied: height:500px!important;

Link to comment
Share on other sites

Hi Vekia! Your example is rather strange IMHO and one I've never encountered. To define the same class 3 times in the same CSS would seem extremely odd and counterproductive. It would IMO defeat the purpose and use of classes.

 

I also think you misunderstood my remarks. The example you gave is not like what we were answering here in this particular thread.

 

The CSS rule that is closest to the element will override the other. If I have <h1>blahblah</h1> and also <div class="rule"><h1>blahblah</h1></div>. I can assign CCS rules to these independently and the rule closest to the element will be applied. IMHO this is different than your example.

 

Marty Shue

Link to comment
Share on other sites

×
×
  • Create New...