Is there any way to modify the background of the gallery images (not 'div' the entire gallery) so that say if I had transparent images in png they'd show the said color as bg as opposed to the page background?
Is there any way to modify the background of the gallery images (not 'div' the entire gallery) so that say if I had transparent images in png they'd show the said color as bg as opposed to the page background?
Like say, this. (This is a photoshopped image). The images are transparent png. What wikitext can affect the background of the image to have the color changed?
That is a css change. I have included an example below. There is another easier way to do it that also changes how the images appear in the New Files page, but the code I have included below only works on page galleries. This code requires to be copied and have the number changed for the most number of galleries on a page, as it changes each gallery on the page with a corresponding part. That part is a bit complicated. To add it you have to add it to the MediaWiki:Common.css
Here is the code:
#gallery-0 .gallery-image-wrapper { background: none repeat scroll 0% 0% rgb(154, 217, 159); border: 1px solid rgb(49, 181, 60); border-radius: 7px; padding: 5px; } #gallery-1 .gallery-image-wrapper { background: none repeat scroll 0% 0% rgb(154, 217, 159); border: 1px solid rgb(49, 181, 60); border-radius: 7px; padding: 5px; } #gallery-2 .gallery-image-wrapper { background: none repeat scroll 0% 0% rgb(154, 217, 159); border: 1px solid rgb(49, 181, 60); border-radius: 7px; padding: 5px; } #gallery-3 .gallery-image-wrapper { background: none repeat scroll 0% 0% rgb(154, 217, 159); border: 1px solid rgb(49, 181, 60); border-radius: 7px; padding: 5px; } #gallery-4 .gallery-image-wrapper { background: none repeat scroll 0% 0% rgb(154, 217, 159); border: 1px solid rgb(49, 181, 60); border-radius: 7px; padding: 5px; }
An example of the codes effect is here:
http://nintendo.wikia.com/wiki/Sonic_the_Hedgehog_%28character%29/gallery
Oh I see. So as I understand, it changes all the galleries, yes? Nothing that changes specific galleries only?
You can change the selector to affect a certain page or a group of similarly named pages. For instance
.page-Thread_488491 { color:#000; }
Will turn all the text on this page black (although it already is). Applying this to the above:
.page-Thread_488491 #gallery-0 .gallery-image-wrapper { background:none repeat scroll 0% 0% rgb(154, 217, 159); border:1px solid rgb(49, 181, 60); border-radius:7px; padding:5px; } etc...
will apply the changes to this page alone.
Is there really no way to do this without resorting to CSS?
I seem to be able to tweak some other things, such as:
<gallery type="slider" orientation="bottom"></blockquote>