change text color of no results found

Home » Forums » Website Search » change text color of no results found


Registered User
9 posts

I have successfully added my own header and footer (thanks to another thread on here) but I'm trying to figure out how to change the font color and size of the text when you do a search and nothing is found.

Right now when I search and it doesnt find anything, it says:
Suggestions:
Try making your search.....
Try using different keywords.
Try avoiding words........

The text is black and I have a darker background and it doesnt show up well. How do you change the color and size of the text as well as what it says?


Senior Advisor
5,354 posts
Online Now

If I'm understanding what your asking, all those settings are available in the CC search. At the top click HTML settings then click on the results tab. There you can tweak how the search results show on your page.:) I can't hear what I'm looking at when it's so easy to overlook something I'm not looking for.
Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/




Registered User
9 posts

The options under the results settings are:
show date/url
definition
Relevance
Wikipedia language

I don't see where I can change or control the text of when the search doesnt find anything. Also, I thought if you added a custom header/footer that it would override any settings on the 'results settings' page anyway.

I could be wrong on this. Appreciate any help.


Senior Advisor
5,354 posts
Online Now

Ok now I see what you talking about.:) I don't know where the web page that's generated gets it's CSS properties. The page is php. I'll have to check to see if the page gets edited if it will overwrite the changes with each search.

How did you change the search results page to a darker background? I can't hear what I'm looking at when it's so easy to overlook something I'm not looking for.
Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/




Registered User
9 posts

I basically followed the tutorial off another thread here:

http://www.coffeecuphelp.com/walkthrough/sitesearch-html.php

and just changed colors to match.


Senior Advisor
5,354 posts
Online Now

I found in the php file where the text can be changed manually to a custom message. Are you willing to edit the php file?

The text color and size for the results is set in the CC search program. It's the html setting that will give you control over the color and size of the text but you will still need to edit the php file to change the message. I can't hear what I'm looking at when it's so easy to overlook something I'm not looking for.
Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/




Registered User
9 posts

Yeah, I don't have any problem changing the wording in the php file. Where at in the program do you change the color and size? Since I'm using a my own header/footer, what do I put in the .css file to control that?


Senior Advisor
5,354 posts
Online Now

To change the size and color of the results and the default message for a return of no results click on html settings at the top of the design window. Then click on the HTML Sttings tab. All the settings on this page are for the results. To edit the search.php file you can open it with notepad or an html editor. The default message starts at line 1102 the file is only 1247 lines so it's almost at the bottom of the page. Here's what your looking for.
$body = ($custom_msg != '') ? $custom_msg :
(" <p class=\"error\">No matches found for search &quot;<strong><em>$query</em></strong>&quot;</p>\n" .
" <h4>Suggestions:</h4>" .
" <ul>\n" .
" <li>Try making your search less specific.</li>\n" .
" <li>Try using different keywords.</li>\n" .
" <li>Try avoiding words that do not pertain to your search.</li>\n" .
" </ul>\n");


It looks like the ccsearch.css custom code your using will override the results settings in the html tab if I'm reading it right. Those settings are the body section in the custom css. I've never done a custom header or footer for my search maybe I'll play with it to match the site I have the search on.:) I can't hear what I'm looking at when it's so easy to overlook something I'm not looking for.
Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/




Senior Advisor
5,354 posts
Online Now

That custom css your using can be tweak to change your text color and size. I did my search and it was pretty painless.

http://selkirklake.net/search.php?q=xcv

I added "color: #FFFF00;" to the body section of the custom css change the text to yellow. and the font size is in that same section.

Post back if you need some more instructions. I can't hear what I'm looking at when it's so easy to overlook something I'm not looking for.
Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/




Registered User
9 posts

Thank you, Thank you! Simply adding the color code into the body of the css did the trick. I wasnt sure which part actually controlled that particular text.

As for the custom default message, that was easy! Thanks for all your help!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.