Your fiddle seems to have some issues with the mark-up and CSS.
Here is an example of what you currently have:
<div id= "flag">
<div id="flag1"> ... </div>
<div id="flag1"> ... </div>
<div id="flag1"> ... </div>
The inner div elements all have the same ID, which should be changed to a class. Your CSS only styles classes, not IDs.
Also, make sure your image src attributes have closing quotes and point to accessible images.
Remember the difference between applying styles to a class vs an ID:
.flag{ .. } // apply to class
vs
#flag { ... } // apply to id
Consider reworking your structure like this:
<div id="flags">
<div class = "flag">
<span>A - ALPHA</span>
<img src="..." title="..." border= "1"/>
</div>
<div class = "flag">
<span>B - BRAVO</span>
<img src="..." title="..." border= "1"/>
</div>
<div class = "flag">
<span>C - CHARLIE</span>
<img src="..." title="..." border= "1"/>
</div>
</div>
To display 8 flags per row, you can start with CSS like this:
#flags {
width: 100%
min-width: 400px;
max-width: 960px;
margin: 0 auto;
}
.flag {
float:left;
display:inline-block;
width:120px;
height:100px;
background-color:pink;
}
.flag span {
display:block:
width:100%
height:40px;
}
.flag img {
display:block:
width:100%;
height:60px;
}