Bottom border on a repeating row

I have created a repeating row that contains Bootstrap column. This is for displaying dynamic data from a query. This part is working fine.

I would like to have a narrow bottom border separating each row. This just to separate the items in one record from the next.

I have tried applying bottom border to the row but this only put a border at the very bottom (after the last row is displayed). I have also tried various suggestions from the AI but have had no success.

Any suggestions please ?

Can you post your repeater code please?

Here is the code:-

{{dateinwords}}

{{venue}}

1 Like
<dmx-serverconnect id="sc_events" url="dmxConnect/api/select_all_events.php"></dmx-serverconnect>
   <div class="container mt-3 row-border">
       <div class="row row-border" is="dmx-repeat" id="repeat_events" dmx-bind:repeat="sc_events.data.query">
           <div class="col-2">
               <h6>{{dateinwords}}</h6>
               <p>{{venue}}</p>
           </div>

row-border class is not a native bootstrap class. You need to add a style to it. Add this code to your page.

<style>
    .row-border {
        border-bottom: 1px solid #ccc; /* Example border style */
        padding-bottom: 10px; /* Optional: Adds space between content and border */
        margin-bottom: 10px; /* Optional: Adds space below the border */
    }
</style>
1 Like

I started off with the native bootstrap classes but the result was the same. I have reverted the code and done a screen shot. The border bottom is 3px so it is easier to see.

The row-border custom class was suggested by the AI. This gave the same result.

    <div class="container mt-3">
        <div class="row border-bottom border-dark border-3" is="dmx-repeat" id="repeat_events" dmx-bind:repeat="sc_events.data.query">
            <div class="col-2">
                <h6>{{dateinwords}}</h6>
                <p>{{venue}}</p>
            </div>
            <div class="col-2"> 

Simply move the repeat code to the container, so that the row is repeated and not the columns.

 <div class="container mt-3" is="dmx-repeat" id="repeat_events" dmx-bind:repeat="sc_events.data.query">
        <div class="row border-bottom border-dark border-3">
            <div class="col-2">
                <h6>{{dateinwords}}</h6>
                <p>{{venue}}</p>
            </div>
            <div class="col-2">