Forum Discussion
CLSimpson
Jul 26, 2022Copper Contributor
Pnp Search Results Template Help
Hi, I'd like to make the search results look better. I'm currently using the below custom code. I'd like to have each result be enclosed in a box of some sort so that each search result is clea...
Joe Ayre
Sep 08, 2023Brass Contributor
Hi CLSimpson,
If you target the first instance of the template--listItem--result class with an inline style, this will give you what you want.
Copy the code you already have and find <div class="template--listItem--result">
Modify this to something like <div class="template--listItem--result" style="background:#efefef">
Then take a look at the results and see what you think. If you want a border, try this instead:
<div class="template--listItem--result" style="border-style:solid;border-color:#999999;border-width:1px">
Have a play around with things to get it how you want it.
Hope that helps,
Joe
If you target the first instance of the template--listItem--result class with an inline style, this will give you what you want.
Copy the code you already have and find <div class="template--listItem--result">
Modify this to something like <div class="template--listItem--result" style="background:#efefef">
Then take a look at the results and see what you think. If you want a border, try this instead:
<div class="template--listItem--result" style="border-style:solid;border-color:#999999;border-width:1px">
Have a play around with things to get it how you want it.
Hope that helps,
Joe