alternating text/image rows

M

MangroveRoot

Here's one for you:
I have a bunch of images (say, half a dozen)
that I want to place vertically down a page.
I want to put the captions beside them.
(Something of an aside, the captions contain links to further explanations.)
What I'd like to do is alternate them this way:
+-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+ +-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+ +-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+
Keep in mind that some images may be taller or wider than others,
and that while some captions may be only a single line, others may not.
Anyone have an elegant way to do that?
 
A

Adrienne Boswell

Gazing into my crystal ball I observed MangroveRoot
Here's one for you:
I have a bunch of images (say, half a dozen)
that I want to place vertically down a page.
I want to put the captions beside them.
(Something of an aside, the captions contain links to further
explanations.) What I'd like to do is alternate them this way:
+-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+ +-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+ +-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+
Keep in mind that some images may be taller or wider than others,
and that while some captions may be only a single line, others may
not. Anyone have an elegant way to do that?

I would say this could be tabular data, where the headers would be image
and data describing the image. Use a table.
 
C

Chris F.A. Johnson

Here's one for you:
I have a bunch of images (say, half a dozen)
that I want to place vertically down a page.
I want to put the captions beside them.
(Something of an aside, the captions contain links to further explanations.)
What I'd like to do is alternate them this way:
+-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+ +-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+ +-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+
Keep in mind that some images may be taller or wider than others,
and that while some captions may be only a single line, others may not.
Anyone have an elegant way to do that?

<http://cfaj.freeshell.org/testing/alternate.shtml>
 
J

Jukka K. Korpela

Scripsit Adrienne Boswell:
I have a bunch of images (say, half a dozen)
that I want to place vertically down a page.
I want to put the captions beside them. [...]
What I'd like to do is alternate them this way:

The right answer is "stop wanting that". Such a setting is confusing and
pointless. There's enough trouble in making users see the intended
association between a caption and his image, or between an image and her
caption, whichever wording expresses your feelings better. So there's no
reason to _intentionally_ create confusion and to force the eye to
participate in silly walks.
I would say this could be tabular data, where the headers would be
image and data describing the image. Use a table.

In the alternating scenario, it's hardly a table logically. What's a column
consisting of alternating images and texts with no connection between an
image and the text below or above it? What would you use as column headers?
(Not all data tables need column headers, but a table for which you could
not possibly write column headers that make sense is most probably not
tabular data.)

In a scenario with one column of images and another column of captions, each
associated with the image on the same row, we have tabular data - and a
<table> element may well be the best approach.
 
W

Watanye

MangroveRoot said:
Here's one for you:
I have a bunch of images (say, half a dozen)
that I want to place vertically down a page.
I want to put the captions beside them.
(Something of an aside, the captions contain links to further
explanations.)
What I'd like to do is alternate them this way:
+-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+ +-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+ +-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+
Keep in mind that some images may be taller or wider than others,
and that while some captions may be only a single line, others may not.
Anyone have an elegant way to do that?

Hello all, first time post, been lurking around a week.

I suppose this is "old school" but that's how I write a lot of my letters.
Just using tables, like everybody has already suggested, is the way to get
it done.
---------------------------------------------------------------------------------------------------

<table width="80%" border="0" style="font-family: times; font-weight: 600;
font-size: 11pt" cellpadding="5">
<tbody>
<tr>
<td><img src="image/gif_folder/nameofimage.gif" align="left"
hspace="9" border="2"><!-- TEXT CONTENT --></td>
</tr>
<tr>
<td><img src="image/gif_folder/notherimage.gif" align="right"
hspace="4" border="2"><!-- TEXT CONTENT --></td>
</tr>
</tbody>
</table>
_____________________________________________________

hspace can be dispensed with if align is set to right, because the color of
the text is usually set relative to the left margin. However, I find it
looks crappy when the text is jammed up next to the image when using align
set to the left, I just use 9 pixels because it's quicker than using 2
keystrokes to make a "10."
 
R

Rob Waaijenberg

MangroveRoot schreef:
Here's one for you:
I have a bunch of images (say, half a dozen)
that I want to place vertically down a page.
I want to put the captions beside them.
(Something of an aside, the captions contain links to further
explanations.)
What I'd like to do is alternate them this way:
+-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+ +-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+ +-------+
| image | <-- caption
+-------+ +-------+
caption --> | image |
+-------+
Keep in mind that some images may be taller or wider than others,
and that while some captions may be only a single line, others may not.
Anyone have an elegant way to do that?


You should visit Dan Cederholms website "Simple Bits";

What you want is described in his book Bulletproof Web design;
the website has example codes in the Publications-section.
What you're looking for is in chapter 4 of the book.
 
A

Adrienne Boswell

Scripsit Adrienne Boswell:
I have a bunch of images (say, half a dozen)
that I want to place vertically down a page.
I want to put the captions beside them. [...]
What I'd like to do is alternate them this way:

The right answer is "stop wanting that".
I would say this could be tabular data, where the headers would be
image and data describing the image. Use a table.

In the alternating scenario, it's hardly a table logically.

In a scenario with one column of images and another column of
captions, each associated with the image on the same row, we have
tabular data - and a
<table> element may well be the best approach.

Right... missed that part about alternating in the OP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top