PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |
Old April 28th, 2009, 03:22 PM   #1 (permalink)
Member
Verified Customer
 
Join Date: Apr 2005
Posts: 21
How to vertically align images in the imagebit?

When browsing thumbnails, how can I get just the images to be vertically centered in each cell, without having the additional info be centered as well?

I think I'm in right place, but 'valign' or 'vertical-align:' don't seem to work. Any ideas?

Here's the vBgallery code I'm working with (unmodified):

Quote:
<td class="alt1" valign="bottom" width="$cellwidth">
<if condition="$images['sticky']">
<div align="$stylevar[right]"><img alt="" class="inlineimg" src="$stylevar[imgdir_misc]/sticky.gif" title="$vbphrase[sticky_image]" /></div>
</if>
<div align="center" style="margin-top:5px;margin-bottom:5px">
<a href="showimage.php?$session[sessionurl]i=$images[imageid]$adv_sorturl"><img alt="$images[title]" border="0" src="$images[url]" /></a>

</div>
sydude is offline   Reply With Quote
Old April 28th, 2009, 11:49 PM   #2 (permalink)
Registered User
 
Join Date: Aug 2005
Posts: 1,229
Well vertically centering images is a bummer...
officially with css standards there are 2 methods..
Understanding vertical-align, or "How (Not) To Vertically Center Content"

but in this case it is more difficult because you
  • you do not know the height of the image
  • you do not know the height of the info box (they are NOT all the same as title, description, exif can vary in length!!!)

there is a method I once tried it worked nicely in firefox 3 but messed up in firefox 2 and ie 7.. though it did work in ie 8

but it required a complete rewrite of the imagebit dropping tables.. so you will never be able to upgrade anymore..

the easiest way to do it would be to calculate the height if each thumbnail when constructing the imagebit.. and then position it absolutely with css

You can also consider that the height of a thumbnail will never exceed the defined thumbnail height, this works for portrait type images, but the landscape type images that are wider than high are mispositioned..

---------------
Another method that works is adding another table inside the td of the imagebit..
(but we want to get rid of tables!!!!)

example :

now we have:
Code:
Content visible to verified customers only.
if you make :
Code:
Content visible to verified customers only.
it would somewhat work as long as your info-boxes are the same height..

-------

What i did to solve the problem, I used square thumbnails, all being the same height, you do not have the problem anymore..

I posted the hack here some time ago.. check the screenshots at the bottom of the post...
http://www.photopost.com/forum/vbgal...sharpener.html

Luc
Luciano is offline   Reply With Quote
Old April 29th, 2009, 12:03 PM   #3 (permalink)
Member
Verified Customer
 
Join Date: Apr 2005
Posts: 21
Thank you very very much. I will likely go the table ( ) route!
sydude is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
align everything properly drew Classifieds How do I...? 1 June 16th, 2006 09:52 AM
gif = invalid file type & imagebit flags are ignored EricR Installs and Upgrade - vBulletin 3.0.X 7 April 6th, 2005 04:40 PM
Links in Imagebit Fields on Gallery Home Page ConqSoft Bugs From 1.0.0 3 March 7th, 2005 09:04 AM
Imagebit Fields - Description oldengine How Do I? - vBulletin 3.0.X 1 January 19th, 2005 07:06 PM


All times are GMT -5. The time now is 08:18 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0