473,396 Members | 2,003 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,396 software developers and data experts.

List with images

Hi,

this is another problem that tempts me to use tables but before I do
that I'm going to ask you.

Sounds simple: A list of images with a description to their right.
Illustration:
http://kundenweb.creations.de/usenet...listimages.jpg

I thought of two solutions:
- Make the images "float: left". Doesn't work because the text - of
course - floats around them.
- Make them "position: abolute" and give the text a left-margin.
Doesn't work either, because the next image slips under the previous.

Regards,
André

Aug 27 '07 #1
5 2967
On Aug 27, 2:33 am, André Hänsel <an...@webkr.dewrote:
Sounds simple: A list of images with a description to their right.
Illustration:http://kundenweb.creations.de/usenet...listimages.jpg
I read the spec again and found a solution:
Because the floating image is out of the flow and hence does not
affected the margin of a subsequent block box I can write:

<div class="item">
<img ...>
<div class="text">
...
</div>
</div>

div.item { clear: both; }
div.item img { float: left; }
div.item div.text { margin-left: <max-width-of-images>px; }

Regards,
André

Aug 27 '07 #2
In article
<11*********************@y42g2000hsy.googlegroups. com>,
André Hänsel <an***@webkr.dewrote:
Hi,

this is another problem that tempts me to use tables but before I do
that I'm going to ask you.

Sounds simple: A list of images with a description to their right.
Illustration:
http://kundenweb.creations.de/usenet...listimages.jpg

I thought of two solutions:
- Make the images "float: left". Doesn't work because the text - of
course - floats around them.
Not "of course", if you provide for a left margin for the element
that has the text, it will not wrap.

Is there some particular reason you do not want to use a table
for this?

--
dorayme
Aug 27 '07 #3
On Aug 27, 4:05 am, dorayme <doraymeRidT...@optusnet.com.auwrote:
In article
<1188174813.984880.80...@y42g2000hsy.googlegroups. com>,
André Hänsel <an...@webkr.dewrote:
I thought of two solutions:
- Make the images "float: left". Doesn't work because the text - of
course - floats around them.

Not "of course", if you provide for a left margin for the element
that has the text, it will not wrap.
Not "of course"? It floats around them when I set them to "float:
left;"... sounds natural to me. ;)
Is there some particular reason you do not want to use a table
for this?
The script code is nicer without them. :)
With tables they must be closed and opened again (or get a colspan)
for each subheader. And they don't inherit fonts.

André

Aug 27 '07 #4
In article
<11**********************@k79g2000hse.googlegroups .com>,
André Hänsel <an***@webkr.dewrote:
On Aug 27, 4:05 am, dorayme <doraymeRidT...@optusnet.com.auwrote:
In article
<1188174813.984880.80...@y42g2000hsy.googlegroups. com>,
André Hänsel <an...@webkr.dewrote:
I thought of two solutions:
- Make the images "float: left". Doesn't work because the text - of
course - floats around them.
Not "of course", if you provide for a left margin for the element
that has the text, it will not wrap.

Not "of course"? It floats around them when I set them to "float:
left;"... sounds natural to me. ;)
(1) The non-floated text does not float in the technical sense

(2) With a left margin, the non-floated text does not float (in
the non technical sense of "flow around", (wrap and drop under
the technical float when it can).
Is there some particular reason you do not want to use a table
for this?

The script code is nicer without them. :)
With tables they must be closed and opened again (or get a colspan)
for each subheader. And they don't inherit fonts.
Sorry, I don't know anything about these things. I am suspicious.
But I do know an expert in scripting who has proved to be pretty
smart with tables. <g>

--
dorayme
Aug 27 '07 #5
André Hänsel wrote:
On Aug 27, 2:33 am, André Hänsel <an...@webkr.dewrote:
>Sounds simple: A list of images with a description to their right.
Illustration:http://kundenweb.creations.de/usenet...listimages.jpg

I read the spec again and found a solution:
Because the floating image is out of the flow and hence does not
affected the margin of a subsequent block box I can write:

<div class="item">
<img ...>
<div class="text">
...
</div>
</div>

div.item { clear: both; }
div.item img { float: left; }
div.item div.text { margin-left: <max-width-of-images>px; }
Reread what dorayme said. He is right (doraymee is f ;) ) and saying the
same as per your solution.
See the thread 2-3 days ago "Starting Over - ........"
Wherein I gave an example of the simple way to accomplish this without
the need of all those DIVs:

img {float:left;clear:left;}
p {margin-left:<max-width-of-images>px;}

<img><p>blah blah</p>

--
Gus
Aug 27 '07 #6

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

Similar topics

0
by: Daniel | last post by:
I am new to python and am trying to make a front end for an emulator. I am using python, livewires and pygame. I am able to do everything I want except createa list box. I have a background...
2
by: | last post by:
I am hoping a mixed ASP- Javascript programmer could help me with this scenario: I have a list box populated with randomized records (NewID()) from a Broker (Salesperson) sql server table. ...
1
by: RugbyTravis | last post by:
I want to have a list that is horizontal and each <li> has different images. I also want them to change on hover. I want the words to be below the images as well. Anyone of you styles gurus have...
0
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another...
7
by: Brian | last post by:
First off, I am sorry for cluttering this group with my inept questions, but I am stuck again despite a few hours of hair pulling. I have a function (below) that takes a list of html pages that...
0
by: Derty | last post by:
Have an issue with a simple drop down list that I need to filter results of a database table and page display. I can get the drop down list to populate correctly but can't make the page databound...
3
by: grzegorz.gazda | last post by:
Hi all Is there any limit of images which can be added to a image list. I have a problem with this control. I added an image list in design mode and I am adding images using code. Then I want to...
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...
5
by: Roy Smith | last post by:
Be kind to me, I'm a CSS newbie... I've been playing with drupal, building a web site (hyc-test.org). I started with the "sky" theme, but didn't like the way it rendered list items in menus. ...
1
by: rirby2 | last post by:
Hi everyone, I'm currently having a rendering problem in IE7 (haven't even tried the lower IEs yet), vs. what I see in FF2. The simplified site can be found at solerasd.com . (There are more...
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: 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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.