alternating text/image rows

Discussion in 'HTML' started by MangroveRoot, Nov 4, 2007.

  1. MangroveRoot

    MangroveRoot Guest

    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?
    MangroveRoot, Nov 4, 2007
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed MangroveRoot
    <> writing in news:px8Xi.331$FO.148@trndny01:

    > 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.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Nov 4, 2007
    #2
    1. Advertising

  3. On 2007-11-04, MangroveRoot wrote:
    >
    >
    > 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>

    --
    Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com>
    ===================================================================
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
    Chris F.A. Johnson, Nov 4, 2007
    #3
  4. MangroveRoot

    Bone Ur Guest

    Well bust mah britches and call me cheeky, on Sun, 04 Nov 2007 01:37:11
    GMT Chris F.A. Johnson scribed:

    >> 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.

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


    I like that but can you get the captions to vertically-center and still
    retain all floats? (I can't think of a sure way offhand.) I did it once
    without using floats (or tables) but don't recall how.

    --
    Bone Ur
    Cavemen have formidable pheromones.
    Bone Ur, Nov 4, 2007
    #4
  5. 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.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Nov 4, 2007
    #5
  6. MangroveRoot

    Watanye Guest

    "MangroveRoot" <> wrote in message
    news:px8Xi.331$FO.148@trndny01...
    > 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."
    Watanye, Nov 4, 2007
    #6
  7. 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.

    --
    Rob
    Rob Waaijenberg, Nov 4, 2007
    #7
  8. Gazing into my crystal ball I observed "Jukka K. Korpela"
    <> writing in
    news:I0fXi.247231$:

    > 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.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Nov 4, 2007
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MattC
    Replies:
    0
    Views:
    1,577
    MattC
    Mar 22, 2005
  2. Stuart Shay
    Replies:
    3
    Views:
    13,093
    Darkmoor
    Aug 20, 2010
  3. Replies:
    3
    Views:
    594
  4. Sachin
    Replies:
    1
    Views:
    359
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jun 1, 2007
  5. Replies:
    4
    Views:
    186
Loading...

Share This Page