Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Is it possible to have the thumbnails aligned at vertical middle rather than at top?!
Is it possible to have the thumbnails aligned at vertical middle rather than at top?!
Comments
Comment #1
Vacilando CreditAttribution: Vacilando commentedComment #2
postak CreditAttribution: postak commentedsolved it for me perhaps in dirty way
adding style to img element: vertical-align: middle
and adding style to li element: line-height: same as height
did following code changes (in version 7.x-1.2):
file gallery_manage.inc
line 176
$displayimage .= '<img style="border: 0; margin:0px; padding:0px; vertical-align: middle;" alt="" src="' . $imgsrc . '" />';
file gallery_showtime.inc
line 418
$style_li = "font-size:0; float: left; width: " . $imagewidth_here . "px; list-style: none; background: " . $bgcolour . "; height: " . $imagemaxh_here . "px; line-height: " . $imagemaxh_here . "px; padding: " . $padding . "px; text-align: " . $thumbalignincell . "; margin: 0px; border: none;";
line 532
$result .= '<img style="border: 0; margin:0px; padding:0px; vertical-align: middle;" alt="" src="' . $imgsrc . '" />';
line 539
$style_li = "font-size:" . $fosiz . "px; float: left; width: " . $imagewidth . "px; list-style: none; background: " . $bgcolour . "; height: " . $imagemaxh . "px; line-height: " . $imagemaxh . "px; padding: " . $padding . "px; text-align: " . $thumbalignincell . "; margin: 0px; border: none;";
not sure if all these changes are needed and whether there is no side effect, but it works for me
(PS: images are not fully centered, but almost... perhaps some tweaking with line-height could do the trick)