[wp-trac] [WordPress Trac] #9400: Gallery column number inline CSS
issue
WordPress Trac
wp-trac at lists.automattic.com
Fri Mar 27 15:16:44 GMT 2009
#9400: Gallery column number inline CSS issue
--------------------------+-------------------------------------------------
Reporter: ECodeStudio | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Media | Version: 2.7
Severity: normal | Keywords: gallery, column number, inline css
--------------------------+-------------------------------------------------
Having more than one gallery on a single page causes the latest one in
code to override the "number of columns" property of the above ones.
This issues is easily fixed by adding the gallery id attribute.
Here is a code snippet to go into wp-includes/media.php
{{{
$output = apply_filters('gallery_style', "
<style type='text/css'>
#gallery-{$id} .gallery {
margin: auto;
}
#gallery-{$id} .gallery-item {
float: left;
margin-top: 10px;
text-align: center;
width: {$itemwidth}%; }
#gallery-{$id} .gallery-icon img {
border: 1px solid #cfcfcf;
}
#gallery-{$id} .gallery-caption {
margin-left: 0;
}
</style>
<!-- see gallery_shortcode() in wp-includes/media.php -->
<div class='gallery' id='gallery-{$id}'>");
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9400>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list