Index: trunk/phase3/includes/ImageGallery.php |
— | — | @@ -275,7 +275,11 @@ |
276 | 276 | $thumbhtml = "\n\t\t\t".'<div style="height: '.(30 + $this->mHeights).'px;">' |
277 | 277 | . htmlspecialchars( $img->getLastError() ) . '</div>'; |
278 | 278 | } else { |
279 | | - $vpad = floor(( 30 + $this->mHeights - $thumb->height ) /2); |
| 279 | + //We get layout problems with the margin, if the image is smaller |
| 280 | + //than the line-height, so we less margin in these cases. |
| 281 | + $minThumbHeight = $thumb->height > 17 ? $thumb->height : 17; |
| 282 | + $vpad = floor(( 30 + $this->mHeights - $minThumbHeight ) /2); |
| 283 | + |
280 | 284 | |
281 | 285 | $imageParameters = array( |
282 | 286 | 'desc-link' => true, |
— | — | @@ -288,11 +292,11 @@ |
289 | 293 | |
290 | 294 | # Set both fixed width and min-height. |
291 | 295 | $thumbhtml = "\n\t\t\t". |
292 | | - '<div class="thumb" style="width: ' .($this->mWidths+30).'px; height: ' .($this->mHeights+30).'px;">' |
| 296 | + '<div class="thumb" style="width: ' .($this->mWidths+30).'px;">' |
293 | 297 | # Auto-margin centering for block-level elements. Needed now that we have video |
294 | 298 | # handlers since they may emit block-level elements as opposed to simple <img> tags. |
295 | 299 | # ref http://css-discuss.incutio.com/?page=CenteringBlockElement |
296 | | - . '<div style="margin:'.$vpad.'px auto 0;">' |
| 300 | + . '<div style="margin:'.$vpad.'px auto;">' |
297 | 301 | . $thumb->toHtml( $imageParameters ) . '</div></div>'; |
298 | 302 | |
299 | 303 | // Call parser transform hook |
Index: trunk/phase3/skins/common/shared.css |
— | — | @@ -780,10 +780,6 @@ |
781 | 781 | margin: 2px; |
782 | 782 | } |
783 | 783 | |
784 | | -li.gallerybox div.thumb a.image img { |
785 | | - vertical-align: text-top; |
786 | | -} |
787 | | - |
788 | 784 | div.gallerytext { |
789 | 785 | overflow: hidden; |
790 | 786 | font-size: 94%; |