473,386 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Reconciling a thumbnail link with adjacent paragraph

I'm trying to resolve a contradictory situation in which I have rows
going down a page, and each consists of two elements: to the left is a
thumbnail image that is a hot link; to its right is a brief descriptive
paragraph.

The contradiction is that if I float the image to the left, the text in
the paragraph is shifted right in its the paragraph box by the
amount of the image width; if I put the text where I want it closer to
the image by moving the paragraph container left to fall under the
image, the area of the image that is over the paragraph box is no longer
hot.

<div class="row">
<a href="graphic.jpg">
<img src="graphic.jpg" />
</a>
<p class="right">The descriptive text</p>
</div>

div.row { overflow: hidden; }
img {
width: 100px; height: 100px;
border-style: none;
float: left;
}
p.right { position: relative; left: 110px; width: 40em; }
</div>

If I change the position of p.right to the left 100px so that the
paragraph it contains is where I want it, that area of the paragraph
box that falls under the image keeps that portion of the image from
being hot. Is there any way around this by using z-index?

There has to be an obvious answer to my problem, but it is not occurring
to me.
--

Haines Brown, KB1GRM

Jun 27 '08 #1
6 2006
Haines Brown wrote:
I'm trying to resolve a contradictory situation in which I have rows
going down a page, and each consists of two elements: to the left is a
thumbnail image that is a hot link; to its right is a brief descriptive
paragraph.
>
There has to be an obvious answer to my problem, but it is not occurring
to me.
It'd be more obvious with a URL to a simplified example of your code.
But it sounds to me as though want you really want is a table (picture
left, text right, for 1 to n rows). I know I'm restating your problem
but it looks like the appropriate approach from here.

--
John
Pondering the value of the UIP: http://improve-usenet.org/
Jun 27 '08 #2
In article <87************@teufel.hartford-hwp.com>,
Haines Brown <br****@teufel.hartford-hwp.comwrote:
I'm trying to resolve a contradictory situation in which I have rows
going down a page, and each consists of two elements: to the left is a
thumbnail image that is a hot link; to its right is a brief descriptive
paragraph.

The contradiction is that if I float the image to the left, the text in
the paragraph is shifted right in its the paragraph box by the
amount of the image width; if I put the text where I want it closer to
the image by moving the paragraph container left to fall under the
image, the area of the image that is over the paragraph box is no longer
hot.

<div class="row">
<a href="graphic.jpg">
<img src="graphic.jpg" />
</a>
<p class="right">The descriptive text</p>
</div>

div.row { overflow: hidden; }
img {
width: 100px; height: 100px;
border-style: none;
float: left;
}
p.right { position: relative; left: 110px; width: 40em; }
</div>

If I change the position of p.right to the left 100px so that the
paragraph it contains is where I want it, that area of the paragraph
box that falls under the image keeps that portion of the image from
being hot. Is there any way around this by using z-index?

There has to be an obvious answer to my problem, but it is not occurring
to me.
Why so complicated? <g>

How about something like:

http://dorayme.890m.com/alt/brown.html

--
dorayme
Jun 27 '08 #3
Dorayme,

Thanks for the example, and indeed it was simpler than my own
effort. The reason I complicated things by using position-relative:
left:... for the descriptive text was because I didn't want the text
position to depend on the width of the thumbnails, for not all are the
same.

I implemented the page as you suggested by simplifying things greatly,
for most thumnails have the same width, and I'll deal with the
exceptions on an an ad hoc basis.

--

Haines Brown, KB1GRM

Jun 27 '08 #4
In article <87************@teufel.hartford-hwp.com>,
Haines Brown <br****@teufel.hartford-hwp.comwrote:
Dorayme,

Thanks for the example, and indeed it was simpler than my own
effort. The reason I complicated things by using position-relative:
left:... for the descriptive text was because I didn't want the text
position to depend on the width of the thumbnails, for not all are the
same.

I implemented the page as you suggested by simplifying things greatly,
for most thumnails have the same width, and I'll deal with the
exceptions on an an ad hoc basis.
You are welcome. It would be useful if you quoted the bits that you are
replying to before your comments. For example, I am wondering what my
demo link was and maybe I can make an improvement for you. Not all of us
have newsreaders that store threads. Mine is an online reader and
forgets everything read (unless especially saved and even then it is not
great for reasons I will not bore you with!). So, here is a self
interest argument to be following normal ng rules. <g>

Nevertheless, let me see in my browser histories where it is and see if
we can do something about you not having to set a left margin to
accommodate different width pics. Ah yes...

A couple of suggestions, set the css left margin of the description
paragraphs for the widest pic you have rather than having to attend to
each. This will have the advantage of table like regularity. But as you
please.

Talking of tables, is there any particular reason not to use a two col
table and let the in-built technology of tables do the alignment work
for you? It is certainly tabular in nature what you are wanting (as, I
recently noticed, John H was urging).

--
dorayme
Jun 27 '08 #5
dorayme <do************@optusnet.com.auwrites:
In article <87************@teufel.hartford-hwp.com>,
Haines Brown <br****@teufel.hartford-hwp.comwrote:
>Dorayme,
Talking of tables, is there any particular reason not to use a two col
table and let the in-built technology of tables do the alignment work
for you? It is certainly tabular in nature what you are wanting (as, I
recently noticed, John H was urging).
The site I'm reconstructing was built in ca. 1997, and since then I lost
control over it. I recently recovered it and am rebuilding it without the
javascript menuing, which didn't work very well (and was a pain for me
to work with). But in redesigning it, I also decided to do away with the
original (non-CSS) tabular organization of the pages. I don't see the
page content as representing a table and try to avoid tables in
ambivalent situations like this. CSS seems to be doing the job for
me just fine.

--

Haines Brown, KB1GRM

Jun 27 '08 #6
In article <87************@teufel.hartford-hwp.com>,
Haines Brown <br****@teufel.hartford-hwp.comwrote:
dorayme <do************@optusnet.com.auwrites:
In article <87************@teufel.hartford-hwp.com>,
Haines Brown <br****@teufel.hartford-hwp.comwrote:
Dorayme,
Talking of tables, is there any particular reason not to use a two col
table and let the in-built technology of tables do the alignment work
for you? It is certainly tabular in nature what you are wanting (as, I
recently noticed, John H was urging).

The site I'm reconstructing was built in ca. 1997, and since then I lost
control over it. I recently recovered it and am rebuilding it without the
javascript menuing, which didn't work very well (and was a pain for me
to work with). But in redesigning it, I also decided to do away with the
original (non-CSS) tabular organization of the pages. I don't see the
page content as representing a table and try to avoid tables in
ambivalent situations like this. CSS seems to be doing the job for
me just fine.
Putting in a table in a page is not laying the page out in tables. And
it is certainly not a bad thing to do when you are dealing with material
that is appropriate to a table.

Your material is appropriate. There are pictures in one col and
corresponding descriptions, row by row, in the other.

Sure, it is fine to do what we discussed previously with floated things
and not use tables. But it is a misdescription to view this alternative
to tables as doing it with CSS. Doing it with tables is doing it with
CSS too (if you have CSS to style the table). Doing without tables is
often doing it 'with divs'

--
dorayme
Jun 27 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mark R. Dawson | last post by:
Hi all, I have a directory full of images (most over 2MB in size) I was to show each image as a thumbnail on a form, however in order to create a thumbnail I have to open the complete image then...
1
by: Xah Lee | last post by:
The following is a program to generate thumbnail images for a website. Useful, if you want to do that. It is used to generate the thumbnails for my “Banners, Damsels, and Mores” project...
8
by: barb | last post by:
So that the world at large benefits from our efforts, here is one fully documented way to use Windows Irfanview freeware to create thumbnail web galleries (http://www.irfanview.com). STEP 1:...
11
by: Jane | last post by:
Hi, I need some help (php rookie) to build a thumbnail page using php. I'v a mysql database containing links to the original image files. No thumbnails created so far. It would be nice when...
4
by: karsting | last post by:
I am using this css. I have a link from the thumbnail to another page, but need to go to the same link on the pop-up image. IN STYLES } .thumbnail{ position: relative; z-index: 0;
13
by: Casimir Pohjanraito | last post by:
I have a list of links, with a thumbnail image hidden(resized) next to the link. Complete html&css at end of this post. CSS for the link resizes the image on a:hover. All is good, except the...
8
by: Arno R | last post by:
Hi all. When I need to search for pictures, I always have too choose thumbnail-view manually. Is it possible to open the common dialog in thumbnail-view programmatically? Example ?? At the...
5
by: Nathan Sokalski | last post by:
I'm not sure if this is the right place to ask this question, but I wasn't sure where else to go. I have a table made of the following tags: <table class="myclass"> <tbody> <tr><td>.</td></tr>...
2
by: Sjef | last post by:
Hallo, I have the following css for thumbnails #duimnagel { float:left; padding:15px 15px 15px 15px; text-align:center; height:120px; }
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.