Using a CSS for search results

Post Reply
davidtg
Posts: 47
Joined: Wed Aug 08, 2001 4:07 pm

Using a CSS for search results

Post by davidtg »

Hi,

I'm working on converting our v2.5 search scripts to v5. In v2.5 we customized the results style so that it used settings from a CSS stylesheet which was loaded in via the top html area of the search script.
Attempting to duplicate the same customizations in the v5 script I having problems where the CSS settings aren't being recognized by the custom result style.
In Top Html via dowalk I set the CSS and its settings are being used by the html in Top and Bottom that follows. But I'm finding that the search results aren't following the fonts and formating from the CSS.

Here is the custom result style:
<!-- display a record in a unique result style -->
<a name=SPHCMstyle>
<setupresult>
<FM>
<br>
<div class="search">
<div class="searchcount">$'next'.&nbsp;&nbsp;<span class="searchresult"><STRONG><result_title></STRONG></span></div>
<div class="searchreturn"><result_abstract></div>
<div class="searchdetails"><i><result_url></i><br>
Size: <result_docsize> &nbsp;-&nbsp; [<result_similar>]&nbsp;-&nbsp;[<result_info>]
</div>
</a>

Is it an issue that when the vortex script file and the profile's Top/Bottom html are merged during a search - that a CSS isn't affecting html within the script?

Lengthy question..sorry but any help appreciated. David
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Using a CSS for search results

Post by John »

The first thing to do would be to look at the actual HTML output produced and see if that looks correct. or if something is missing. You may need to modify the various result_ functions to make sure nothing they do overrides the CSS style.
John Turnbull
Thunderstone Software
davidtg
Posts: 47
Joined: Wed Aug 08, 2001 4:07 pm

Using a CSS for search results

Post by davidtg »

Yup - I had several errors that were keeping it from working. The css classes had been renamed in the css and I learned the <FM> tag is Vortex Font Macro. Looking at the page source from the browser was very helpful - should have thought of that first. I corrected the class names and removed the <FM> and the now css is applied correctly to the custom style. Oh and those result_ macros didn't add any html formating which is good.

Thanks, David
Post Reply