Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why my site lost its grid layout alignment. It's made with masonry

I created a gallery page. It displays images with variable heights. As suggested here to use a masonry plugin i used masonry plugin. It worked great till last night.

But this morning when i checked it again i lost the alignment. No alterations done to the site since past 3 days. Here is the snapshot. Check my site's screen shot here

Earlier, all div's are automatically adjusted(The marked spaces were eliminated) and the display looked like

http://pinterest.com/

But all of a sudden my site lost its alignment. Unable to figure out the issue.

What might be the issue .... Please help me. In a big problem with my site

Here are the css alignment and masonry application

#body {background-color:#1c4d5c;padding:10% 0% 20% 20%;}
#imagesection
{
margin:10px 10px 10px 10px;
float:left;
width:214px;
border: 5px solid #f0f0f0;
background-color:#d2dbde;
border-radius:5px;
}

var $container = $('#body');

$container.imagesLoaded( function(){
  $container.masonry({
    itemSelector : '#imagesection'
  });
});

Masonry doesn't work in IE 8 Masonry doesn't work in IE 8

Note: I am using codeigniter, Hence i am loading header, body, footer etc files in view.

like image 215
Ramaraju.d Avatar asked Dec 19 '12 10:12

Ramaraju.d


People also ask

What is masonry grid layout?

Masonry layout is a layout method where one axis uses a typical strict grid layout, most often columns, and the other a masonry layout. On the masonry axis, rather than sticking to a strict grid with gaps being left after shorter items, the items in the following row rise up to completely fill the gaps.

What is masonry gallery?

A WordPress Masonry gallery is a popular grid layout that uses optimal spacing to place images without the need to crop them. No matter what orientation your images, the masonry gallery template in FooGallery makes your images look great.

What is masonry in web design?

Masonry is a grid layout based on columns. Unlike other grid layouts, it doesn't have fixed height rows. Basically, Masonry layout optimizes the use of space inside the web page by reducing any unnecessary gaps. Without this type of layout, certain restrictions are required to maintain the structure of layout.

How do you use masonry in CSS?

To use masonry layout, one of your grid axes needs to have the value masonry . This will then be referred to as the masonry axis, the other axis will have rows or column tracks defined as normal, this will be the grid axis. The CSS below creates a four-column grid, with the rows set to masonry .


1 Answers

Try to use only required class from masonry plugin like .box .col2 ...

Other classes might effect your total alignment..

like image 72
Abhi Avatar answered Oct 11 '22 22:10

Abhi