My idea is simple: Identify the state of one element and change the style of another element accordingly:
I try this and the div element inside the threedot div doesn't change and stays invisible. How do I make this work?
/* El css: */
#trespuntos b:hover {
display: none;
#trespuntos div {
display: block;
}
}
#trespuntos b {
font-size: 3em;
}
#trespuntos div {
display: none;
}
<!-- El HTML: -->
<div id="trespuntos">Descripción:<b>...</b>
<div>
<h3>Beneficios:</h3>
<ul>......</ul>
<h3>Ploblemas:</h3>
<ul>.......</ul>
</div>
</div>
It is not syntactically correct to nest selectors in CSS, as it can be done in supersets like LESS, SASS , Stylus and SCSS. Every cascading relationship (the C in css) is expressed outside of curly braces.
If the expression you put were admissible, it would still be pointing to
"un <div id='trespuntos'> dentro de un elemento <b> dentro de un <div id='trespuntos'>"
What you want to do can be done by styling the sequence:
cuando se produzca un elemento X seguido de un elemento Y, dale este estilo
Although style sheets generally operate from parent to child, this is an example of styles that apply between siblings.