Selecting different parts of css selector
Is it possible in a selector like this:
div table
Select the divs that have been filtered? As in divs that contain a table instead of all tables that a开发者_开发百科re in divs.
CSS selectors can not ascend. It is one of their limitations.
Also see Does CSS have anything like jQuery's :has()?
No, but you can normally solve this problem with adding classes to your div elements, to help differentiate them from other divs.
This can however be done with Jquery with .parent()
.parents()
or :parent
Might be something work checking out.
精彩评论