473,382 Members | 1,717 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,382 software developers and data experts.

Flow 2-row elements (images with titles)

I'd like to know how I can create a flow of 2-row elements
that is resized by the browser window.

I.e., I want to bind elements together (in a div, or table, or something)
and then treat the combined element as a single character that will flow
with automatic line breaks.

I have a photo album page that has basically a single stream
of <a href="photo.jpg" target="photo"><img src="thumb.jpg" title="xx"></a>
This works nicely; I can place the photo window on the monitor and
resize the index window beside it, or underneath, and scroll it only
in the vertical direction. Automatic line break puts however many thumbnails
on the line as will fit and no more.
Now I want to put a (possibly multi-line) title underneath each image,
but keep the automatic line break. If I put this in individual tables,
I get forced line breaks. If I put them in table elements, I don't
get any line breaks at all, just one long line.
I don't want to use a fixed table width, as that is making assumptions
about the window size, and I'd rather do something simple
in HTML or CSS than a complicated script.

Is it even possible ?

(if you have an answer, email is good...but I'll check the list..)

--
Andrew Daviel

Jul 24 '05 #1
2 2137
Andrew Daviel <an****@daviel.org> wrote:
Now I want to put a (possibly multi-line) title underneath each
image, but keep the automatic line break.


There are several alternatives, such as the HTML-only approach of
making the image and a title a two-cell table and using <table
align="left"> and the basically CSS approach of wrapping the image and
the title inside a div element and setting float: left for that
element.

But it's a long story, with many pros and cons for each method... see
http://www.cs.tut.fi/~jkorpela/www/captions.html

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 24 '05 #2
Jukka K. Korpela <jk******@cs.tut.fi> wrote:
Andrew Daviel <an****@daviel.org> wrote:
Now I want to put a (possibly multi-line) title underneath each
image, but keep the automatic line break.


There are several alternatives, such as the HTML-only approach of
making the image and a title a two-cell table and using <table
align="left"> and the basically CSS approach of wrapping the image and
the title inside a div element and setting float: left for that
element.


Thanks!

<table align="left"> did not work for me - it creates one long line.
But <table style="{float:left}"> does what I want in Mozilla and IE 6
and falls back to a readable newline-every-image page in Netscape 4.
Since I'm regenerating the index with a script every time I add new photos,
I have made a text file of
captions to read in. Next trick, actually writing sensible captions
for the photos ...

If anyone wants a copy of the Perl script, which also extracts
"taken" dates from Kodak CX camera JPEGs, please ask (email).
I used the 2-cell approach and made the captions as well as the thumbnails
links to the full-size photos. I am pretty sure this will get the image
indexed properly in Google ...

--
Andrew Daviel

Jul 24 '05 #3

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

Similar topics

3
by: Albert Ahtenberg | last post by:
Hello, I had some bad experience with code organization and script functionality in writing my php based applications. And as the applications get bigger in scale it gets even worse. Therefore,...
11
by: Robert Bowen | last post by:
Hello all. I have been given mock-ups (in static HTML) of some pages for a site I am working on. The client would like these pages to look exactly as they do now. The problem is that the content is...
5
by: Miyra | last post by:
Hi. I'm working with an app that uses exceptions for control flow. These are code blocks where exceptions are thrown/caught regularly. A couple hundred exceptions occur per hour and they're caught...
9
by: Alvin Bruney [MVP] | last post by:
Exceptions must not be used to control program flow. I intend to show that this statement is flawed. In some instances, exceptions may be used to control program flow in ways that can lead to...
1
by: Brett | last post by:
I'd like to have all of my documentation in one place. I use the following for documenting code: - attributes for certain types of documentation - use of the C# generated inline XML...
7
by: Jack | last post by:
Are there any rules of thumb for when it is appropriate to use grid mode vs. flow mode in the Visual Studio.NET WebForm designer?
7
by: codepp | last post by:
Hello I need a way to create a flow chart for some code written in C. I need if there are a normalized way to create it like UML. Thanks in advance.
2
by: brianlum | last post by:
Hi, I have been looking for a good way to convert python code into a control flow graph. I know of Python functions that will convert an expression into an abstract syntax tree (i.e. ast =...
0
by: kellyonlyone | last post by:
E-XD++ MFC Library Enterprise Edition V9.80 is released (100% Source Code)! ("The only Flow/Diagramming Kits that provides full source code of components for MFC and ActiveX in a single package!")...
0
by: kellyonlyone | last post by:
E-XD++ MFC Library Enterprise Edition V11.0 is released (100% MFC/C++ Source Code)! ("The only Flow/Diagramming Kits that provides full source code of components for MFC and ActiveX in a single...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?

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.