Hello
I'm trying to make s div's automatically fit one next to the other and if there is no side space you go and automatically dock from left to right, but it's not working.
NOTE: What determines the format of the DIV is the image that goes into it.
Follow my code and the image of how I want to do it.
HTMLcode
<html><head><title></title><style>article.tile{display:block;float:left;box-sizing:border-box;width:100px;height:100px;font-size:3em;font-weight:700;padding:06px;color:#fff;text-shadow:-1px0black,01pxblack,1px0black,0-1pxblack;border:1pxdottedblack;}article.tile.wide{width:200px;}article.tile.tall{height:200px;}.tile.yellow{background:yellow;}.tile.red{background:red;}.tile.blue{background:blue;}.tile.black{background:black;}.tile.grey{background:grey;}.tile.green{background:green;}</style></head><body><article><divclass="tile blue"><p>1</p></div>
<div class="tile black"><p>2</p></div>
<div class="tile yellow"><p>3</p></div>
<div class="tile grey"><p>4</p></div>
<div class="tile red"><p>5</p></div>
</article>
</body>
</html>
Thank you