Home › Forums › General XMetaL Discussion › CSS to colour a parent element based on content of attribute on a child element › Reply To: CSS to colour a parent element based on content of attribute on a child element
Reply to: CSS to colour a parent element based on content of attribute on a child element
March 11, 2010 at 1:07 amI don't know of a way to achieve exactly what you're looking for, however if you need to signal that the child element has an empty attribute, you could do this by using before-text to make the child element visible and styled. For example:
child[status=””]:before
{
display: inline;
content: “No status specified”;
color: red;
}
Would this work for you?