I need help completing a part of my PAP, perhaps one of the most important parts, photo album, but I have a big problem with divisions, opá, I walk around the wheel and nothing.
I have here an example of my code, but the problem is explicit.
I can not seem to make the div
outer increase by adding other divs inside.
div.gallery {
margin: 5px;
border: 1px solid #ccc;
float: left;
width: 180px;
}
div.gallery:hover {
border: 1px solid #777;
}
div.gallery img {
width: 100%;
height: auto;
/*Background color just for example*/
background-color: yellow;
}
div.desc {
padding: 15px;
text-align: center;
/*Background color just for example*/
background-color: yellow;
}
<div style="color: #ddd;background-color:#282E34;text-align:center;padding:50px 80px;text-align: justify">
<h3 style="text-align:center;color: #ddd">ALBUM</h3>
<div class="gallery">
<a target="_blank" href="img_fjords.jpg">
<img src="img_fjords.jpg" alt="Fjords" width="300" height="200">
</a>
<div class="desc">Add a description of the image here</div>
</div>
<div class="gallery">
<a target="_blank" href="img_forest.jpg">
<img src="img_forest.jpg" alt="Forest" width="300" height="200">
</a>
<div class="desc">Add a description of the image here</div>
</div>
<div class="gallery">
<a target="_blank" href="img_fjords.jpg">
<img src="img_fjords.jpg" alt="Fjords" width="300" height="200">
</a>
<div class="desc">Add a description of the image here</div>
</div>
<div class="gallery">
<a target="_blank" href="img_forest.jpg">
<img src="img_forest.jpg" alt="Forest" width="300" height="200">
</a>
<div class="desc">Add a description of the image here</div>
</div>
<div class="gallery">
<a target="_blank" href="img_fjords.jpg">
<img src="img_fjords.jpg" alt="Fjords" width="300" height="200">
</a>
<div class="desc">Add a description of the image here</div>
</div>
<div class="gallery">
<a target="_blank" href="img_forest.jpg">
<img src="img_forest.jpg" alt="Forest" width="300" height="200">
</a>
<div class="desc">Add a description of the image here</div>
</div>
<div class="gallery">
<a target="_blank" href="img_fjords.jpg">
<img src="img_fjords.jpg" alt="Fjords" width="300" height="200">
</a>
<div class="desc">Add a description of the image here</div>
</div>
<div class="gallery">
<a target="_blank" href="img_forest.jpg">
<img src="img_forest.jpg" alt="Forest" width="300" height="200">
</a>
<div class="desc">Add a description of the image here</div>
</div>
</div>
</div>