Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,895 questions

51,826 answers

573 users

How to use contextual text background colors in table rows with Bootstrap

1 Answer

0 votes
<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet"
        href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
  
<body>
  
<div class="container">
  <h1>Bootstrap Table With Contextual Text Background Colors in Table Rows</h1>
   <table class="table table-hover">
    <thead>
      <tr>
        <th>Test Col1</th>
        <th>Test Col2</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>default</td>
        <td>default</td>
      </tr>
      <tr class="success">
        <td>success</td>
        <td>success</td>
      </tr>
      <tr class="info">
        <td>info</td>
        <td>info</td>
      </tr>
      <tr class="danger">
        <td>danger</td>
        <td>danger</td>
      </tr>
      <tr class="warning">
        <td>warning</td>
        <td>warning</td>
      </tr>
      <tr class="active">
        <td>active</td>
        <td>active</td>
      </tr>
    </tbody>
  </table>
</div>
  
</body>
</html>

 



answered Jul 8, 2017 by avibootz
edited Jul 8, 2017 by avibootz

Related questions

1 answer 178 views
1 answer 196 views
1 answer 149 views
...