Title: large gap between gallery image rows
Last modified: August 20, 2016

---

# large gap between gallery image rows

 *  [rbseid](https://wordpress.org/support/users/rbseid/)
 * (@rbseid)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/large-gap-between-gallery-image-rows/)
 * I’m trying to setup a page that makes it easy for my client to add images that
   will automatically have each row center-align vertically on the page (similar
   to this page [http://www.bgcsmv.org/our-partners](http://www.bgcsmv.org/our-partners)
   which is a single .pdf and not easy to add to). The page I need help on is [http://www.bgcsmv.org/test-page](http://www.bgcsmv.org/test-page).
   As you can see, there is a large gap between the top row of images and the next
   row.
 * Does anyone know how to correct this problem or have a better solution?
 * I did this by setting the gallery to use medium size images which I set in media
   settings to max width 180/ max height 150. I then added the following code to
   my stylesheet:
 *     ```
       .gallery-item {
       width: 33%!important;
       display: inline-block;
       float: none!important;
       text-align: center;
       vertical-align: middle;
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/large-gap-between-gallery-image-rows/#post-3382612)
 * somehow the `<br style="clear: both">` of the gallery rows seems to be influencing
   the sidebar (?)
 * try to add this to style.css:
 * `.entry { overflow: hidden; }`
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/large-gap-between-gallery-image-rows/#post-3382614)
 * The problem actually looks like it is the “clear: both;” tags just above the 
   row that has dropped far down — look for the first line of code in this clip:
 *     ```
       <br style="clear: both" />
       <dl class='gallery-item'>
       			<dt class='gallery-icon'>
       				<a href='http://www.bgcsmv.org/wp-content/uploads/image005-e1358710667419.jpg' title='image005'><img width="180" height="70" src="http://www.bgcsmv.org/wp-content/uploads/image005-180x70.jpg" class="attachment-medium" alt="image005" /></a>
       			</dt></dl><dl class='gallery-item'>
       ```
   
 *  Thread Starter [rbseid](https://wordpress.org/support/users/rbseid/)
 * (@rbseid)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/large-gap-between-gallery-image-rows/#post-3382632)
 * Adding to my style.css: .entry { overflow: hidden; } fixed it in all browsers
   except chrome (which ignored both the gap issue and the center align issue) and
   opera (which displays with correct center alignment but still has the gap).
 * WPyogi: I don’t know how to follow your advice. Does that involve editing the
   WordPress core files?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘large gap between gallery image rows’ is closed to new replies.

## Tags

 * [align](https://wordpress.org/support/topic-tag/align/)
 * [gallery](https://wordpress.org/support/topic-tag/gallery/)
 * [images](https://wordpress.org/support/topic-tag/images/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [rbseid](https://wordpress.org/support/users/rbseid/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/large-gap-between-gallery-image-rows/#post-3382632)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
