I have the following HTML code:
<div id="contenedor">
<input id="tab1" type="radio" name="opcion" checked="checked" />
<label for="tab1">Tab1</label>
<input id="tab2" type="radio" name="opcion" />
<label for="tab2">Tab2</label>
<input id="tab3" type="radio" name="opcion" />
<label for="tab3">Tab3</label>
<div id="contenido">
<div id="contenido1">
<p class="left"><img src="imagenes/una.jpg" alt="">Contenido 1 primer párrafo</p>
<p class="left last"><img src="imagenes/dos.jpg" alt="">Contenido 1 segundo párrafo</p>
</div>
<div id="contenido2">
<p>Contenido 2 primer párrafo</p>
<p>Contenido 2 segundo párrafo</p>
</div>
<div id="contenido3">
<p>Contenido 3</p>
<ul>
<li>Lorem ipsum</li>
<li>Lorem ipsum</li>
<li>Lorem ipsum</li>
</ul>
<p>Lorem ipsum</p>
</div>
</div>
</div>
And I need to hide all the div with id "content (number)", and visualize the content of which is checked.
First I get it with:
#contenido {
display: none;
}
But to show the check I can not determine the form.
This does not work.
#contenedor input: checked #contenido {
display: block;
}
You can not use JavaScript, or edit the HTML. Which makes it difficult for me to find a solution, logically.
Greetings and thanks.