A
A
Anton2018-02-13 14:04:01
css
Anton, 2018-02-13 14:04:01

How to fix css layout?

https://codepen.io/anon/pen/qxjwdO
There is this piece of code:

#radio1:checked ~ .desc1{
    display: block;
}

Checking the first radio, the desc1 div is shown, but it doesn't work for some reason.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tyzberd, 2018-02-13
@anton99zel

https://codepen.io/anon/pen/mXwgQx

A
Anton, 2018-02-13
@Eridani

Because .desc1 is not a nested element in the input.

<input type="radio" name="radio" value="radio1" id="radio1"><div class="desc1">Постамат - автоматизированный терминал выдачи заказов</div>  </input>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question