7 replies [Last post]
gsoper
Offline
newbie
Last seen: 12 years 4 weeks ago
Joined: 2003-12-17
Posts: 5
Points: 0

I'm currently working on a photo album system and am trying to use CSS to arrange the photos and their captions. I'm doing it in such a way that the photos flow, using the available width. This becomes obvious if you vary the width of the browser window while displaying
http://geoffsoper.co.uk/photos/index2.php?page=photos;album_id=11 . My problem is when pictures have different size captions as in the following example http://geoffsoper.co.uk/photos/index2.php?page=photos;action=album;album_id=6

Any idea how I can fix the second example to flow like the first, i.e. in regular full rows and columns.

Thanks,
Geoff

dJomp
dJomp's picture
Offline
Enthusiast
Last seen: 3 years 41 weeks ago
Joined: 2003-03-23
Posts: 422
Points: 0

flowing images fluidly

Without setting heights for the DIVs, and keeping the flow... nope, sorry. Wish I knew how too, I had the same problem a while back.

You know you're a geek when you try to shoo a fly away from the monitor with your cursor.

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 16 years 2 days ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

flowing images fluidly

Agree

Would need to set a height for the containing div. You could then set a height for the div containing text and add overflow visible/auto in case the text is too large.

Regards
Day

The only way to learn is to do it yourself

Big John
Big John's picture
Offline
Enthusiast
Arizona
Last seen: 16 years 2 weeks ago
Arizona
Timezone: GMT-7
Joined: 2003-10-29
Posts: 94
Points: 0

flowing images fluidly

Quote:
Would need to set a height for the containing div. You could then set a height for the div containing text and add overflow visible/auto in case the text is too large.

Unfortunately that won't work in IE/win, because that browser
wrongly enlarges the div to fit the content. M$ decided they
knew better than the W3C but this problem illustrates why
they have their collective heads up you-know-where.

Holly Bergevin and I worked out a method to make IE handle
variable length captions after much testing, and those articles
appear in communitymx.com:

http://www.communitymx.com/abstract.cfm?cid=A52CA453E3BD8593

http://www.communitymx.com/abstract.cfm?cid=AECCDCBE38B8A02E

Unfortunately the trolls at CMX felt this pair of articles was good
enough to restrict to our membership. The cost for non-members
is 5 bucks per article, but you can try the free ten day trial and
read all you want. You don't get support files, but the method
in this case is all laid out in the articles. Trust me, we already
went thru the mill on this one, so you don't have to.
HTH

http//www.positioniseverything.net/

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 16 years 2 days ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

flowing images fluidly

but hold on - not if you have a fixed height and overflow auto.

Regards
Day

PS: Hope they pay you BigJohn for your work, otherwise as the Author, you can do what you want with it. Wink

The only way to learn is to do it yourself

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 16 years 2 days ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

flowing images fluidly

WOOOHOOO

A fix for IE6 expanding past the set size

Just add

overflow: hidden;

works for both height and width

Spread the word.

have not checked ie5.x so would appreciate someone doing so.

Regards
Day

PS: the CMX guys have to pay me though :twisted:

The only way to learn is to do it yourself

Big John
Big John's picture
Offline
Enthusiast
Arizona
Last seen: 16 years 2 weeks ago
Arizona
Timezone: GMT-7
Joined: 2003-10-29
Posts: 94
Points: 0

flowing images fluidly

Actually I'm a partner there, so I get a cut of the profits. Cool

"Hidden" does work if you don't mind part of the enlarged
text not showing. Guess I should have mentioned that.

http//www.positioniseverything.net/

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 16 years 2 days ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

flowing images fluidly

but auto also works and you do not lose any text

Big John wrote:
"Hidden" does work if you don't mind part of the enlarged text not showing

Same for Mozilla. There are two items we are talking about here. I will move my supposely new hack to another thread.

Regards
Day

The only way to learn is to do it yourself