Reputation: 1
I am trying to achieve this: http://prntscr.com/2zurxz But so far able to do this: http://prntscr.com/2zus2j
Any CSS, Javascript expert out there to help?
HTML/CSS code is there: JSFiddle
Thanks!
HTML:
<div class="block tags">
<a href="#">sportcards</a>
<a href="#">atari</a>
...
</div>
CSS
.block {
float: left;
margin-bottom: 15px;
border: 1px #e3e3e3 solid;
background: #fcfcfc;
width: 208px;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
}
.tags {
border: none;
border-radius: 0px;
background: none;
}
.tags a {
display: inline-block;
font-family: Georgia, Times, "Times New Roman", serif;
font-size: 12px;
font-style: italic;
color: #107ea1;
background: #e0f4fb;
padding: 7px 13px 6px 12px;
margin-bottom: 4px;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
}
.tags a:hover {
background: #9bdaee;
}
Upvotes: 0
Views: 52
Reputation: 2930
To fit them perfectly you will need javascript.
Take a look at jQuery Masonry plugin
That link doesn't load examples for some reason.. try this
Upvotes: 1