Welcome to WebmasterWorld Guest from 54.227.126.69

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Create tables 2 rows at a time

     
1:48 pm on Jun 8, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Jan 30, 2008
posts:104
votes: 0


I'm building an inventory page with PHP/MySQL and I'd like to build a table that contains a photo in the top row, and a title at the bottom of the cell that is aligned with all the other titles. The trouble is that some photos are different aspect ratios so the titles are not aligned properly. Is it possible for me to build a table by adding 2 rows at once, and still build left to right? I've tried nested tables but that didn't have the desired effect. I may end up going through the array one at time, but i'm hoping to avoid that.
2:14 pm on June 8, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 6, 2008
posts:2011
votes: 0


Have a fixed width table and center all the content in the rows?
2:16 pm on June 8, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Feb 22, 2009
posts:1396
votes: 0


Hi there wesg,

Why not use the gd library function set that php has to do you some thumb nail type images so that you can specify your image height & width, then you shouldn't have any misaligned cells/rows, just a thought there.

Cheers,
MRb
3:03 pm on June 8, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Jan 30, 2008
posts:104
votes: 0


I took all the suggestions, and used a different approach. Originally my image resize script resized based on width. I've modified it so it now resizes based on height, and my titles now line up. It still looks best if the images are the same aspect ratio, but this will work.

Thanks!
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members