Cześć,
Mam problem, gdy dodaję diva nadrzędnego to znika mi podrzędny. Jak to naprawić?
<div class="gallery">
<input class="radio" type="radio" name="dots" id="dot1" checked>
<label for="dot1" class="dots_label" id="dot_label1"></label>
<input class="radio" type="radio" name="dots" id="dot2">
<label for="dot2" class="dots_label" id="dot_label2"></label>
<input class="radio" type="radio" name="dots" id="dot3">
<label for="dot3" class="dots_label" id="dot_label3"></label>
<input class="radio" type="radio" name="dots" id="dot4">
<label for="dot4" class="dots_label" id="dot_label4"></label>
<input class="radio" type="radio" name="dots" id="dot5">
<label for="dot5" class="dots_label" id="dot_label5"></label>
<div class="photophotos">
<div class="photos">
<div class="picture1">
<label for="dot6" class="arrow"><</label>
<img src="zdjecia/zdjecie1.jpg" class="zdjecie1">
<label for="dot2" class="arrow">></label>
</div>
<div class="picture2">
<label for="dot1" class="arrow"><</label>
<img src="zdjecia/zdjecie2.jpg" class="zdjecie2">
<label for="dot3" class="arrow">></label>
</div>
<div class="picture3">
<label for="dot2" class="arrow"><</label>
<img src="zdjecia/zdjecie3.jpg" class="zdjecie3">
<label for="dot4" class="arrow">></label>
</div>
<div class="picture4">
<label for="dot3" class="arrow"><</label>
<img src="zdjecia/zdjecie5.jpg" class="zdjecie4">
<label for="dot5" class="arrow">></label>
</div>
<div class="picture5">
<label for="dot4" class="arrow"><</label>
<img src="zdjecia/zdjecie6.jpg" class="zdjecie5">
<label for="dot1" class="arrow">></label>
</div>
</div>
</div>
.photophotos {
width: 500px;
height: 500px;
}
.photos {
width: 100%;
display: flex;
justify-content: center;
margin-top: 10px;
}
.zdjecie1,
.zdjecie2,
.zdjecie3,
.zdjecie4,
.zdjecie5 {
width: 80%;
float: left;
}
.arrow {
display: flex;
justify-content: center;
align-items: center;
width: 10%;
background-color: #1453ff;
height: 100%;
float: left;
font-size: 70px;
}
.dots_label {
display: block;
width: 24px;
height: 24px;
background-color: #1453ff;
border-radius: 12px;
margin: 5px;
}
.dots_label:hover {
background-color: #386eff;
}
#dot1:checked~#dot_label1,
#dot2:checked~#dot_label2,
#dot3:checked~#dot_label3,
#dot4:checked~#dot_label4,
#dot5:checked~#dot_label5 {
background-color: #6891ff;
}
.radio {
display: none;
}