Hey everyone, I have multiple divs with classes like ItemLeft, ItemMiddle, and ItemRight. I want to know how I can display these image divs in rows of 3 using CSS or any simple method. Currently, all the images are displaying one below the other.
I am fetching the image divs through a getJSON call like this:
$.getJSON('http://www.awebsite.com/get?url=http://www.bwebsite.com/moreclips.php&callback=?', function(data){
//$('#output').html(data.contents);
var siteContents = data.contents;
document.getElementById("myDiv").innerHTML=siteContents
Please note: every time I make the getJSON call, I receive 6 image divs which appear stacked vertically instead of 3 in a row!
Below are the div images retrieved by the getJSON call, but they are displayed one after the other rather than in rows of 3:
<div class="ItemLeft">
<div class="Clipping">
<a class="ImageLink" href="/videos/id1234" title="galaxy">
<img class="ItemImage" src="/Images/galaxyimg.jpg" alt="galaxy" />
<img class="OverlayIcon" src="/Images/1.png" alt="" />
</a>
<a class="DurationInfo" onmouseover="showDuration2(this);" onmouseout="hideDuration2(this);" href="/videos/id1234"><span class="Text">51:57</span></a>
</div>
<div class="Title"><a href="/videos/id1234" title="galaxy">galaxy</a></div>
<div class="VideoAge">1 daybefore</div>
<div class="PlaysInfo"> broadcast 265</div>
</div>