0

Is there a way to select all td's with a image inside?

td img {} selects all images inside a td, but may I go the other way?

Emil
  • 1,626
  • 1
  • 16
  • 21
  • There's no parent selector. – Bhojendra Rauniyar Jul 15 '15 at 10:34
  • No, Css can only go in the descendant way – singe3 Jul 15 '15 at 10:34
  • You should consider using some javascript to do what you need. – singe3 Jul 15 '15 at 10:35
  • there can be multiple ways one can achieve as suggested above, and it would be good if you post your code along, it would help you to get some good suggestion and advices – Sumit Surana Jul 15 '15 at 10:37
  • Css doesn't support parent selectors as mentionned here : http://stackoverflow.com/questions/2000582/css-selector-for-foo-that-contains-bar Instead using Javascript with Jquery it can be as simple as : https://jsfiddle.net/pgd0noew/ – singe3 Jul 15 '15 at 10:40

0 Answers0