Skip to content

Commit

Permalink
Fixed gutters.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Stone committed Apr 5, 2012
1 parent 423e240 commit 6ef22ee
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
4 changes: 3 additions & 1 deletion example/index.html
Expand Up @@ -10,6 +10,8 @@
</head> </head>
<body> <body>
<button id="add">Add Box</button> <button id="add">Add Box</button>
<div id="container"></div> <div id="container-wrap">
<div id="container"></div>
</div>
</body> </body>
</html> </html>
14 changes: 8 additions & 6 deletions example/masonry.css
Expand Up @@ -9,20 +9,22 @@ body {
padding-top: 15px; padding-top: 15px;
} }


#container { #container-wrap {
padding: 10px;
padding-bottom: 0;
background-color: black; background-color: black;
width: 100%; margin: 15px 0;
padding: 5px; }
margin-top: 15px;
#container {
} }


.box { .box {
padding: 5px; padding: 5px;
margin: 5px;
background-color: #ccc; background-color: #ccc;
float: left; float: left;
width: 190px; width: 190px;
box-sizing: border-box; margin-bottom: 10px;
} }


.box .close { .box .close {
Expand Down
13 changes: 10 additions & 3 deletions example/masonry.js
Expand Up @@ -6,8 +6,14 @@ $(function () {
}; };


function create () { function create () {
var close = $('<a>').attr('href', '#').addClass('close').text('Close'), var close = $('<a>')
$box = $('<div>').addClass('box').lorem(lorem).prepend(close); .attr('href', '#')
.addClass('close')
.text('Close'),
$box = $('<div>')
.addClass('box')
.append($('<span>').lorem(lorem))
.prepend(close);


// Make box resizable // Make box resizable
$box.resizable({ $box.resizable({
Expand All @@ -29,7 +35,8 @@ $(function () {
$('#container').masonry({ $('#container').masonry({
itemSelector: '.box', itemSelector: '.box',
columnWidth: 100, columnWidth: 100,
isAnimated: true isAnimated: true,
gutterWidth: 5
}); });


add(); add();
Expand Down

0 comments on commit 6ef22ee

Please sign in to comment.