Display images inline with captions in?

FatherCarbon

Registered Member
Joined
Sep 30, 2008
Messages
96
Reaction score
63
I've searched and searched and tried and tried, but I just can't get this to work:

I want images displayed in a row, with a caption underneath each one.

[ ] [ ] [ ] [ ] [ ]
c1 c2 c3 c4 c5

Something like that. ASCII art ftw!

This should probably be in the HTML section, as PHP won't be involved with the actual display, but the app will be in PHP.
 
The easiest way would be to put create a table and put the images in it.

Something like:

table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>

You would definitely want to enhance it using .css, but I hope it helps.
 
Last edited:
I hate tables, I'd much rather use divs :(
But if it works, it works! :D
 
Well you could use divs like this:

Code:
<div style="float:left" align="center">
	<img src="yourimage.jpg" />
	<br />
	Your Caption
</div>
<div style="float:left" align="center">
	<img src="yourimage.jpg" />
	<br />
	Your Caption
</div>
<div style="float:left" align="center">
	<img src="yourimage.jpg" />
	<br />
	Your Caption
</div>
<div style="float:left" align="center">
	<img src="yourimage.jpg" />
	<br />
	Your Caption
</div>
 
Back
Top