<div id="subpage"> <tr id="serverlist"> <table> <tr class='serverinfo'> <td class='servericon'> </td> <td> </td> <td></td> <tr> <td></td> <td> </td> <td> </td> </tr> </table> </tr> </table> </div>
The poster table tag must be complete, organize the tags and then set the css
The poster table tag must be complete , organize the tags and then set the css
Does the table need to have an ID? Assuming that the ID of the table is servertable, how to set the styles of serverinfo and servericon? And table should have no effect on serverlist
My tags are nested
<!DOCTYPE HTML><html> <head> <meta charset="gb2312" /> <title></title> <style> #subpage #serverlist{ color:red; } </style> </head> <body> <div id="subpage"> <table> <tr id="serverlist"> <td> <table> <tr class='serverinfo'> <td class='servericon'> </td> <td> </td> <td>123</td> <tr> <td>123</td> <td> </td> <td> </td> </tr> </table> </td> </tr> </table> </div> </body></html>
I want to set the margin-left of the td element with class servericon to 30px. How to achieve this?
The original poster: margin is the outer margin and padding is the inner padding
Setting the margin-left of the servericon here can be achieved by setting its own padding or setting the padding of the parent DOM td or table or div
<div id="subpage"> <table> <tr id="serverlist"> <td> <table> <tr class='serverinfo'> <td class='servericon'> 123 </td> <td> </td> <td></td> <tr> <td>123</td> <td> </td> <td> </td> </tr> </table> </td> </tr> </table> </div>