CSS 3 · Selectors and the box model
Select a parent by its children
Style a card that contains an image.
.card:has(img) {
padding: 0;
}
CSS 3 · Selectors and the box model
Style a card that contains an image.
.card:has(img) {
padding: 0;
}
Was this page helpful?