Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

css has parent selector

/* If no image, add radius to the top left and right corners. */
.card:not(:has(img)) .card__content {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.card img {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.card__content {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}
Source by ishadeed.com #
 
PREVIOUS NEXT
Tagged: #css #parent #selector
ADD COMMENT
Topic
Name
5+2 =