Thursday, April 25, 2019

css selector for td with an input element










How would I make a css selector with that applies style to a table cell that has an input child element?


Answer




Unfortunately, you can't target parent elements in CSS yet (I believe it will come in CSS3)(see Sam's answer). If you want to do this, you'll either have to a) use javascript or b) add a class name to the td containing the input.



Here is a nice reference of the selectors you can use currently to target children, siblings, types, etc.


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...