I have this xml code for example:
<br>
<?xml version="1.0" encoding="iso-8859-1"?>
<raiz>
<activo/>
</raiz>
<br>
and I would like to show the active word in the browser by applying css.
I have this xml code for example:
<br>
<?xml version="1.0" encoding="iso-8859-1"?>
<raiz>
<activo/>
</raiz>
<br>
and I would like to show the active word in the browser by applying css.
With CSS, you can select the elements% co_of% empty: activo
( link ). For example, the rule
activo:empty {
border: 1px solid red;
}
causes the browser to put a border on active:empty
elements that have no content (except comments).
You can also insert content in these elements with the activo
selector, for example:
activo:empty::before {
content: 'empty';
}
raiz, activo {
display: block;
}
activo:empty {
border: 1px solid red;
}
activo:empty::before {
content: 'empty';
}
<raiz>
<activo></activo>
<activo>contenido</activo>
</raiz>
I self-answer is already fixed by adding CSS activo:before {
content: "Activo";
}