HTML CSS examples for CSS Selector:nth-child
Use pseudo-class :not with :nth-child
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> table tr td:not(:nth-child(2)):not(:nth-child(4)) { text-align:center; } </style> <!--from w w w.ja v a 2 s. c om--> </head> <body> <table border="1" width="100%"> <tbody> <tr> <td>L</td> <td>L</td> <td>L</td> <td>L</td> <td>L</td> </tr> </tbody> </table> </body> </html>