Home › Forums › DITA and XMetaL Discussion › CSS challenge › Reply To: CSS challenge
Reply to: CSS challenge
September 23, 2010 at 11:13 pmAnother CSS option: OK, this is hacky, but it should work for one or two
/*Assume section titles are misplaced*/
section>title:before {
content: “[Misplaced title] “;
color:red;
font-weight: bold;
}
/*Title which is the first element in a section*/
section>title:first-child:before
{
content: “”;
color: Black;
}
/*Title which is the second element in a section, after an indexterm*/
section>indexterm:first-child + title:before
{
content: “”;
color: Black;
}
/*Title which is the second element in a section, after two indexterms*/
section>indexterm:first-child + indexterm + title:before
{
content: “”;
color: Black;
}