I am trying to make my site more user friendly, I have a table as shown in the image below which is putting lines under the text of the columns that have bootstrap classes to remove them on smaller screens.
I can't seem to get rid of this issue. I am using standard bootstrap 4 CSS.
My code for the table looks like this, appreciate the help.
<div class='container mx-auto' style='width: 100%'> <table class='table table-hover' style='width: 100%'> <thead class='bg-primary text-white'> <tr> <th class='bg-primary text-white border-left border-right d-none d-xl-block'>ID</th> <th class='col-2 bg-primary text-white border-left border-right'>Date</a></th> <th class='bg-primary text-white d-none d-lg-block'>Venue</th> <th class='bg-primary text-white'>Comp</th> <th class='bg-primary text-white border-left border-right d-none d-lg-block'>M/F</th> <th class='col-2 bg-primary text-white border-left border-right'>Home Team</th> <th colspan='2' class='col-1 bg-primary text-white border-left border-right text-center'>Score</th> <th class='col-2 bg-primary text-white border-left border-right'>Away Team</th> <th class='bg-primary text-white border-left border-right d-none d-md-block'>Referee</th> <th class='bg-primary text-white border-left border-right text-center'>Edit</th> <th class='bg-primary text-white border-left border-right text-center'>Delete</th> </tr> </thead> <tbody> <?php if($result = mysqli_query($link,$sql)) { while ($row = mysqli_fetch_array($result)) { echo " <tr> <td class='border-left border-right d-none d-xl-block'>{$row[6]}</td> <!-- ID --> <td class='border-left border-right'><a href='viewMatch.php?matchID={$row[6]}'>{$row[0]}</a></td><!-- Date --> <td class='text-left border-left border-right d-none d-lg-block'>{$row[1]}</td><!-- Venue --> <td class='border-left border-right'>{$row[2]}</td><!-- Comp --> <td class='border-left border-right d-none d-lg-block' style='text-align:center'>{$row[7]}</td><!-- Gender --> <td class='border-left border-right'>{$row[3]}</td><!-- Home Team --> <td class='border-left border-right' style='text-align:center'>{$row[8]}</td><!-- Home Score --> <td class='border-left border-right' style='text-align:center'>{$row[9]}</td><!-- Away Score --> <td class='border-left border-right'>{$row[4]}</td><!-- Away Team --> <td class='border-left border-right d-none d-md-block'>{$row[5]}</td><!-- Referee -->"; if($role >= 5) { echo " <td class='border-left border-right text-center'> <form action='../edit/updateMatch.php' method='POST' onsubmit=''/> <input type='hidden' name='q' value='".$row[6]."'/><button class='btn btn-primary' type='Submit' value='Update'><i class='fa fa-edit'></i></button> </form> </td>"; } if($role > 5) { echo " <td style='text-align:center'> <form action='../delete/deleteMatch.php' method='POST' onsubmit='' onclick='return confirm(`do you want to delete {$row[3]} vs {$row[4]} on the {$row[0]}`)'/><input type='hidden' name='q' value='".$row[6]."' /><button class='btn btn-danger' type='Submit' value='Delete'><i class='fa fa-trash'></i></button> </form> </td>"; } echo " </tr>"; } echo " </tbody> </table> </div> </div>";
from Recent Questions - Stack Overflow https://stackoverflow.com/questions/65376847/bootstrap-display-class-affecting-table-header RBurns https://i.stack.imgur.com/InL9k.png
没有评论:
发表评论