Index: skins/common/shared.css =================================================================== --- skins/common/shared.css (Revision 77338) +++ skins/common/shared.css (Arbeitskopie) @@ -786,31 +786,36 @@ } /* Galleries */ -table.gallery { - border: 1px solid #ccc; +/*These display attributes look non-sensical, but are needed to support IE and FF2*/ +li.gallerybox { + vertical-align: top; + background-color: #f9f9f9; + border: solid 2px white; margin: 2px; + display:-moz-inline-box; +} + +ul.gallery { + margin: 2px; padding: 2px; background-color: white; + display:block; } -table.gallery tr { - vertical-align: top; +ul.gallery, ul.gallery>li { + display:inline-block; + zoom:1; + *display:inline; } -table.gallery td { - vertical-align: top; - background-color: #f9f9f9; - border: solid 2px white; -} -table.gallery caption { +ul>li.gallerycaption { font-weight: bold; + text-align: center; + display: block; + word-wrap: break-word; } -div.gallerybox { - margin: 2px; -} - -div.gallerybox div.thumb { +li.gallerybox div.thumb { text-align: center; border: 1px solid #ccc; margin: 2px; Index: includes/DefaultSettings.php =================================================================== --- includes/DefaultSettings.php (Revision 77338) +++ includes/DefaultSettings.php (Arbeitskopie) @@ -886,7 +886,7 @@ * Default parameters for the tag */ $wgGalleryOptions = array ( - 'imagesPerRow' => 4, // Default number of images per-row in the gallery + 'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize 'imageWidth' => 120, // Width of the cells containing images in galleries (in "px") 'imageHeight' => 120, // Height of the cells containing images in galleries (in "px") 'captionLength' => 20, // Length of caption to truncate (in characters) Index: includes/ImageGallery.php =================================================================== --- includes/ImageGallery.php (Revision 77338) +++ includes/ImageGallery.php (Arbeitskopie) @@ -85,10 +85,11 @@ /** * Set how many images will be displayed per row. * - * @param $num Integer > 0; invalid numbers will be rejected + * @param $num Integer >= 0; If perrow=0 the gallery layout will adapt to screensize + * invalid numbers will be rejected */ public function setPerRow( $num ) { - if ($num > 0) { + if ($num >= 0) { $this->mPerRow = (int)$num; } } @@ -198,7 +199,7 @@ /** * Set arbitrary attributes to go on the HTML gallery output element. - * Should be suitable for a <table> element. + * Should be suitable for a "; return $s; }