Topic: Changing colour of links in a "thead > tr > th"
SecretOne pro asked 6 years ago
table class="table table-sm table-striped table-hover table-responsive w-auto"> <thead class="unique-color"> <tr class="text-white"> <th style="text-align: right">No.</th> <th style="text-align: left"><a href="view_partno.php?page=<?php echo $page; ?>&sort=partno">Part Number:</a></th> <th style="text-align: left"><a href="view_partno.php?page=<?php echo $page; ?>&sort=description">Description:</a></th> <th style="text-align: center">Image</th> <th style="text-align: left"><a href="view_partno.php?<?php echo $page; ?>&sort=category">Category:</a></th> <th style="text-align: left">Fits sweepers</th> <th style="text-align: center">Edit/Delete</th> </tr> <thead>Currently I have had to "frig it" with the following css
thead tr th a { color: white; !important;} thead tr th a:hover { color: darkgrey; !important;} thead tr th a:visited { color: white; !important;} thead tr th a:active { color: darkgrey; !important;}It seems that a mdb class competing with it. CSS is not my strong point. Many thanks in advance, Andre
Marta Wierzbicka staff answered 6 years ago
a.white-text:hover { transition: all .2s ease-in-out; color: #eee !important; }We will add these settings to styles of MDB in the next release. Best, Marta
SecretOne pro commented 6 years ago
Hi Marta, Thank you very much that has done the trick :) getting just what I want now. Brilliant. AndreMarta Wierzbicka staff answered 6 years ago
.white-text
class to the <a href="">
tag:
<table class="table table-sm table-striped table-hover table-responsive w-auto"> <thead class="unique-color"> <tr class="text-white"> <th style="text-align: right">No.</th> <th style="text-align: left"><a class="white-text" href="view_partno.php?page=<?php echo $page; ?>&sort=partno">Part Number:</a></th> <th style="text-align: left"><a class="white-text" href="view_partno.php?page=<?php echo $page; ?>&sort=description">Description:</a></th> <th style="text-align: center">Image</th> <th style="text-align: left"><a class="white-text" href="view_partno.php?<?php echo $page; ?>&sort=category">Category:</a></th> <th style="text-align: left">Fits sweepers</th> <th style="text-align: center">Edit/Delete</th> </tr> <thead> </table>Best, Marta
SecretOne pro commented 6 years ago
Hi Marta, Thank you for the reply, I will give it ago but I am sure I tried this method. I will let you know. Many thanks, AndreSecretOne pro commented 6 years ago
Hi Marta, I tried this and yes the link went white but now I have no hover effect etc. If I remove colours from the table it works without any modification, but I do not want a white background for the header row/columns. AndreFREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No