lundi 30 juillet 2018

applying alternate row color CSS for laravel table

How can I apply alternate row color CSS in laravel table. i want to display alternate color for the table rows. I've kept gridview cssclass in the table. I want to apply .gridview tr.even td for the even row count i.e. the rows with multiple of 2.

My CSS file

.gridview {
    font-family: "arial";
    background-color: #FFFFFF;
    width: 100%;
    font-size: small;
}

    .gridview th {
        background: #0CA3D2;
        padding: 5px;
        font-size: small;
    }

    .gridview td {
        background: #B6E1EE;
        color: #333333;
        font: small "arial";
        padding: 4px;
    }

    .gridview tr.even td {
        background: #FFFFFF;
    }

Table code

<table id="showBooksIn" class="table table-bordered gridview">
            <thead>
                <tr>
                    <th>BOOK ID</th>
                    <th>BILLED DATE</th>                      
                </tr>
            </thead> 
            <tbody>
                @foreach($ordered_books as $data)
                 <tr>
                     <td>  </td>                         
                     <td>  </td>
                 </tr>
                @endforeach
          </tbody>          
        </table>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire