arunpatal Posted January 15, 2013 Share Posted January 15, 2013 Hi, The Code below applys background and border to both table..... i just need it to apply in table1 only.. How can i do that? <style> .table1, td{ background-color:#999; border:dashed 1px #666666; width:400px; height:200px; } </style> <table class="table1"> <tr> <td>table1</td> <td>table1</td> </tr> <tr> <td>table1</td> <td>table1</td> </tr> </table> <table class="table2"> <tr> <td>table2</td> <td>table2</td> </tr> <tr> <td>table2</td> <td>table2</td> </tr> </table> Link to comment https://forums.phpfreaks.com/topic/273177-apply-border-to-all-cells-in-one-specific-table/ Share on other sites More sharing options...
arunpatal Posted January 15, 2013 Author Share Posted January 15, 2013 Ok after.. googling I found that it should work like this <style> .table1 td { background-color:#999; border:dashed 1px #666666; width:400px; height:200px; } .table2 td { background-color:#CF6; border:dashed 1px #C33; width:400px; height:200px; } </style> <table class="table1"> <tr> <td>table1</td> <td>table1</td> </tr> <tr> <td>table1</td> <td>table1</td> </tr> </table> <table class="table2"> <tr> <td>table2</td> <td>table2</td> </tr> <tr> <td>table2</td> <td>table2</td> </tr> </table> Link to comment https://forums.phpfreaks.com/topic/273177-apply-border-to-all-cells-in-one-specific-table/#findComment-1405792 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.