Divider line on search page

This topic contains 5 replies, has 3 voices, and was last updated by  Stiofan O’Connor 6 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #411667

    David Sirius
    Expired Member
    Post count: 163

    Hi All,

    I would like to have a divider line between each result on the search page like you can see here: https://www.arbolife.com/en/stores/health-food/?sort_by=rating_count_desc

    I did this initally by inserting a <hr> tag in the listing-listview.php with the following code: <hr class=”mydivider”> and css:

    
    
    hr.mydivider {
      border: 0;
      height: 1px;
      background-image: -webkit-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
      background-image: -moz-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
      background-image: -ms-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
      background-image: -o-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
    }
    

    However, I noticed know this only works for the list view, but doesnt work when changing the view selection to grid mode (see screenshot).

    How could I amend the code properly to include the HR tag so that its shown only when the list view is selected?

    Many thanks
    David

    #411683

    Kor
    Moderator
    Post count: 16516

    Hi David,

    Thanks for reaching us. Sorry, your screenshot is not very clear. Could you tell me where do you want the line to appear? The attached is what I see.

    #411690

    David Sirius
    Expired Member
    Post count: 163

    Hi Kor,

    The link I posted is an example geodir page (not my page!) to demonstrate how I want it to work, while my page has the issue as per screenshot in original post (i.e. hr line is static).

    I want a grey divider line like in this screenshot (attached marked in red border), but naturally only when the listview ist active. So when the listview is not active ie. a grid view is selected 2-5 then the hr line needs to dissappear like in your screenshot from the example page otherwise the results are not aligned next to each other because the hr line breaks each result item (as you can see from my first screenshot).

    Thank you for looking into this!

    Cheers,
    David

    #411704

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    That user has added this CSS rule

    
    
    .geodir_category_list_view li {
        border-bottom: 1px #C8C8C8 dashed;
        padding-bottom: 15px;
        margin-bottom: 15px;
        display: block;
        list-style: none;
    }

    Stiofan

    #411706

    David Sirius
    Expired Member
    Post count: 163

    Fantastic, works perfectly! Didnt think it would be easily solvable via CSS.

    Thank you so much!!

    #411723

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You are welcome! 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket