davecave
davecave

Reputation: 4818

Vertical Gaps Appearing - jQuery Masonry - (seamless photo grid)

This question has already been asked in a different situation.

I am trying to achieve a seamless photo grid with jQuery Masonry.

Check out my fiddle:

http://jsfiddle.net/drw158/sAkjv/

There is a vertical gap. Why?

Upvotes: 1

Views: 2596

Answers (3)

Jonathan Joosten
Jonathan Joosten

Reputation: 1509

You should make the <img/> a float.

Upvotes: 0

midishero
midishero

Reputation: 107

The problem is your doctype. Change it to XHTML 1.0 Transitional then everything is fine

Upvotes: 0

Blender
Blender

Reputation: 298136

Display your images as block-level elements:

.ct-coll-item img {
  display: block;
}

See if this works: http://jsfiddle.net/drw158/sAkjv/1/

As for the why, I have no idea. My guess would be because the images are inline elements, but that isn't a direct explanation.

Upvotes: 2

Related Questions