PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

results_title and .highlight css in search results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • results_title and .highlight css in search results

    Hello, I am trying to figure out how to change the hover colour for the .highlight class when the highlighted text is within the results_title class. I have tried several options, the latest being:

    .result_title a .highlight:hover {background: #000;}

    This seemed to work temporarily (for some odd reason) but then reverts back to the standard yellow background.

    Anybody have any ideas on how to resolve this?

  • #2
    Actually, that code is working, in that it gives a black background to the 'highlight class in the result title on hover, but what I'm trying to do is provide a black background to the result title which will include the highlighted part as well, if that makes any sense?

    Comment


    • #3
      Can't say I'm sure what you mean by "black background to the result title which will include the highlighted part as well".

      You can style the .result_title to have a black background.

      If you mean on hover over the result title, maybe you want something like:

      .result_title a:hover { background: #000; }

      --Ray
      Wrensoft Web Software
      Sydney, Australia
      Zoom Search Engine

      Comment


      • #4
        Thanks, Ray. I know I didn't explain it very well and also that it is technically a coding matter rather than a Zoom Search one, but what I mean is that I am trying to make ALL of the result_title link have a black background on hover, including the .highlight class part, Currently, if I hover on the non .highlight part only it has a black background and not the higlighted part. The best way to properly explain is by a visual example:

        http://www.libraryireland.com/names/...=10&zoom_and=0

        If you hover on the "Ui" part of the first result title you will see what I mean, I hope.Don't worry if you don't have a ready answer. I'll crack it eventually by hook or by crook.

        One other thing, how do I remove the "Search for:" wording beside the search box - is that done in the search.php file?

        Apologies for the trouble.

        Comment


        • #5
          Hmm, I don't know how you can pull that off. The highlight span is a class within the result_title div, so that's why hovering over the "highlight" part will trigger both the .result_title a:hover style as well as the .highlight a:hover style.

          But when you hover over just the part that's within .result_title but not within .highlight, then there's no easy way to extend that style into the highlight class. The highlight style (which is background-color: yellow) will override the style for the same property defined before -- that's why its called "Cascading" Style Sheets.

          Perhaps you should consider changing the highlight style so that it's not reliant on the background color. For example, you can just mark the text colour red (not the background colour). That way, the black background will carry forward. In other words, just have:

          .highlight { color: #FF0000; }

          Hope that makes sense.

          Regarding the "Search for:" text -- don't edit the "search.php" file. You can remove the text either via the ZLANG language file ("Configure"->"Languages"->Edit English.zlang file) and changing the entry from:

          STR_FORM_SEARCHFOR=Search for:

          To:

          STR_FORM_SEARCHFOR=

          OR alternatively, you simply hide the text with CSS,

          label.zoom_searchbox { display: none; }
          --Ray
          Wrensoft Web Software
          Sydney, Australia
          Zoom Search Engine

          Comment


          • #6
            Ray, excellent response as ever. Thank you. You have produced a super product at a very affordable price. It has been a great boon to me, and I haven't yet had the leisure to explore all the features properly. I'm sure that dealing with constant queries can be tiresome at times, but on the plus side I am certain that many people are grateful both for the search engine and the support.

            Comment


            • #7
              You're welcome, cheers. Glad to be of help.
              --Ray
              Wrensoft Web Software
              Sydney, Australia
              Zoom Search Engine

              Comment

              Working...
              X