[wp-trac] [WordPress Trac] #10734: Gallery Shortcode Causes XHTML Validation Failure

WordPress Trac noreply at wordpress.org
Sat Sep 28 07:10:47 UTC 2013

#10734: Gallery Shortcode Causes XHTML Validation Failure
 Reporter:  achmafooma    |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Gallery       |     Version:
 Severity:  normal        |  Resolution:  maybelater
 Keywords:                |

Comment (by tar.gz):

 A little addition to this: the current gallery code doesn't work well for
 fluid/responsive layouts, because it injects a line break with <br
 style="clear: both"> after every third item (or whatever column number has
 been chosen). This is pretty much impossible to override with CSS alone.

 A clean solution would be to get rid of the <br/> and set the line returns
 by using the :nth-child() CSS selector - then a responsive theme can
 override it easily with it's own CSS.

 The downside is that :nth-child is supported only
 [http://caniuse.com/#search=nth-child from IE9 onwards].

Ticket URL: <http://core.trac.wordpress.org/ticket/10734#comment:43>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list