Apply style to only first level of td tags

后端 未结 7 1780
执念已碎
执念已碎 2020-12-13 03:29

Is there a way to apply a Class\' style to only ONE level of td tags?



7条回答
  •  轮回少年
    2020-12-13 03:41

    Just make a selector for tables inside a MyClass.

    .MyClass td {border: solid 1px red;}
    .MyClass table td {border: none}
    

    (To generically apply to all inner tables, you could also do table table td.)

提交回复
热议问题