Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > alternating text/image rows

Reply
Thread Tools

alternating text/image rows

 
 
MangroveRoot
Guest
Posts: n/a
 
      11-04-2007
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?
 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      11-04-2007
Gazing into my crystal ball I observed MangroveRoot
<(E-Mail Removed)> writing in newsx8Xi.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

 
Reply With Quote
 
 
 
 
Chris F.A. Johnson
Guest
Posts: n/a
 
      11-04-2007
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)
 
Reply With Quote
 
Bone Ur
Guest
Posts: n/a
 
      11-04-2007
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.
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      11-04-2007
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/

 
Reply With Quote
 
Watanye
Guest
Posts: n/a
 
      11-04-2007

"MangroveRoot" <(E-Mail Removed)> wrote in message
newsx8Xi.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."


 
Reply With Quote
 
Rob Waaijenberg
Guest
Posts: n/a
 
      11-04-2007
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
 
Reply With Quote
 
Adrienne Boswell
Guest
Posts: n/a
 
      11-04-2007
Gazing into my crystal ball I observed "Jukka K. Korpela"
<(E-Mail Removed)> writing in
news:I0fXi.247231$(E-Mail Removed) i.fi:

> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grid View Event Not Working on Alternating Rows Stuart Shay ASP .Net 3 08-20-2010 11:45 AM
Repeater: Different StyleSheets for alternating rows Sachin ASP .Net 1 06-01-2007 06:17 PM
Different columns for alternating rows in gridview tsedward@wingate.edu ASP .Net 3 04-17-2007 12:51 PM
Code for alternating colored rows. crab.dae@gmail.com ASP General 4 06-12-2006 05:48 PM
Colorize Rows in DataGrid other than alternating MattC ASP .Net 0 03-22-2005 09:31 AM



Advertisments