Okay so first off i’ve tried the overflow:hidden; but it didnt work so basically this is what my div is looking but when i add more images to it the div does not expand with it.
.working{
width: 600px;
height: 2000px;
background-color: #ECECEC;
border-style: ridge;
border-width: 5px;
overflow: hidden;
}
<div class="working">
<p align: left; style="font-size: 25px; font-weight: bold; color: #39F51B; display: block;"> <img src="img/shopify.jpg" align="middle" style="width: 100px; height: 100px;">
Shopify dropshipping</p>
<p align: left; style="clear: left; display: block; font-size: 25px; font-weight: bold; color: black;"><img src="img/code.png" align="middle" style="width: 100px; height: 100px;">
Coding </p>
<p align: left; style="clear: left; display: block; font-size: 25px; font-weight: bold; color: black;"><img src="img/ads.jpg" align="middle" style="width: 100px; height: 100px;">
Advertisement </p>
<p align: left; style="clear: left; display: block; font-size: 25px; font-weight: bold; color: black;"><img src="img/amazon.png" align="middle" style="width: 100px; height: 100px;">
Amazon Mechanical Turk </p>
<p align: left; style="clear: left; display: block; font-size: 25px; font-weight: bold; color: black;"><img src="img/fiverr.png" align="middle" style="width: 100px; height: 100px;">
Fiverr </p>
<p align: left; style="clear: left; display: block; font-size: 25px; font-weight: bold; color: black;"><img src="img/foap.jpg" align="middle" style="width: 100px; height: 100px;">
Sell your photos </p>
<p align: left; style=" font-size: 25px; font-weight: bold; color: black;"><img src="img/pocketflip.jpg" align="middle" style="width: 100px; height: 100px;">PocketFlip</p>
</div>
2
Answers
Its because you have a fixed height.
Try removing
height:2000px
.Removing
height:2000px;
and addheight:auto;
. It will solve your height problem. Height will increase when you add newdiv
orp
in it.