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> Quote Link to comment 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> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.