Can I Color Table Columns Using CSS Without Coloring Individual Cells?
Có thể bạn quan tâm
Is there a way to color spans of columns all the way down. See, starting example below:
<table border="1"> <tr> <th>Motor</th> <th colspan="3">Engine</th> <th>Car</th> <th colspan="2">Body</th> </tr> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td>6</td> <td>7</td> </tr> <tr> <td>7</td> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td>6</td> </tr> </table>
And I am looking for a better way (less code, non-individual coloring) to color, for example, "Engine" and "Body" spans, including all the cells underneath them in #DDD
<style> .color { background-color: #DDD } </style> <table border="1"> <tr> <th>Motor</th> <th colspan="3" class="color">Engine</th> <th>Car</th> <th colspan="2" class="color">Body</th> </tr> <tr> <td>1</td> <td class="color">2</td> <td class="color">3</td> <td class="color">4</td> <td>5</td> <td class="color">6</td> <td class="color">7</td> </tr> <tr> <td>7</td> <td class="color">1</td> <td class="color">2</td> <td class="color">3</td> <td>4</td> <td class="color">5</td> <td class="color">6</td> </tr> </table>
Từ khóa » Html Table Set Column Background Color
-
HTML Col Tag - W3Schools
-
How To Change The Background Color Of An HTML Table - ThoughtCo
-
Table Colors & Background : MGA - Web Development Tutorials
-
HTML Table Background Color
-
Table Background Color
-
Coloring CSS Tables - HTML
-
HTML Table Basics
-
How To Easily Set The Table Background Color - WpDataTables
-
HTML |
Bgcolor Attribute - GeeksforGeeks How To Set Background Color In The First Column Of A Table (HTML ...
Modifying Table Background Color - Scripting Master
Background Color Based On Cell Value In HTML Table
Setting Table Colors - Documentation For Action Request System 21.3
Table Visualization — Pandas 1.4.3 Documentation
Copyright © 2022 | Thiết Kế Truyền Hình Cáp Sông Thu