PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

CSS, Results Href & search.php

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

  • CSS, Results Href & search.php

    Hi there,

    having problems applying a style to the results link.

    Reason being that I am including the search in a custom template via php which works fine, however, the search template file only gives a general link css definition (a:link ..visited, hover etc). Consequently if, for example, I turn the href setting to font weight: bold .. ALL links on the page (also in my template) turn bold despite other css settings.

    To make a long story short.. I need to be able to give the results href an individual class but don't know how to. Tried editing the search.php only resulting in an error and noted that search.php will get dumped anyhow each time re-indexing occurs. Is there any way to avoid this?

    More important though .. the url css problem ..

    Thanks for any advice..

  • #2
    See this FAQ
    How do I customize the appearance of my search page with CSS?


    Changing the appearance of links
    Change the colour of the links to red and it only underlines when you put your mouse over it:
    a:link { color: #FF0000; text-decoration: none; }
    a:visited { color: #FF0000; text-decoration: none; }
    a:hover { color: #FF0000; text-decoration: underline; }
    a:active { color: #FF0000; text-decoration: none; }

    The above would define the style of all hypertext links on the page. If you wish to have a different look for other links, you will have to use a CSS subclass. For example, the following would define only search result links to be green, independent of the other links which may appear on the search template page.
    .result_title a:link { color: #00FF00; text-decoration: none; }
    .result_title a:visited { color: #00FF00; text-decoration: none; }
    .result_title a:hover { color: #00FF00; text-decoration: underline; }
    .result_title a:active { color: #00FF00; text-decoration: none; }

    Comment


    • #3
      thx .. that didi the job..

      Comment

      Working...
      X