The only thing I can think of is caching or grouping. The code looks all right to me as it is, and it definitely should work.
Is the results grouping or caching enabled by any chance? For grouped results this code won’t work.
As for the second request, the only possible way I see is to edit the results template file to a similar structure and add corresponding CSS as well. Here is an knowledge-base article explaining how to do that. I only recommend editing these files, if you are falmiliar with PHP, HTML and CSS programming.Best,
If you like my products, don't forget to rate them on codecanyon :)