add media query to gallery shortcode
-
Can anyone help me to add media queries to the gallery shortcode function? I’ve read elsewhere that simply adding the CSS to my stylesheet doesn’t work. WP gallery uses it’s own CSS in the shortcode function. So I copied the entire function to my functions.php in my child theme and did the remove shortcode/add shortcode.
The section in the shortcode for the CSS is this (I believe):
if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) { $gallery_style = " <style type='text/css'> #{$selector} { margin: auto; } #{$selector} .gallery-item { float: {$float}; margin-top: 10px; text-align: left; width: {$itemwidth}%; } #{$selector} img { border: none; } #{$selector} .gallery-caption { margin-left: 0; }
How do I use “#{selector}” with @media?
Thanks for any and all help!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘add media query to gallery shortcode’ is closed to new replies.