thanks that was a great help. i have managed to use the code with the following css. however on the largest screen i am getting three images across but they are not filling the screen i am getting large border either side. i have also getting rather large borders on the other sizes aswell.. i dont know if i have over complicated the css but this is what i have.
Code:
/*.filter-categories span { display:inline-block; padding:0.25em 0; white-space:nowrap }
.filter-text, .filter-label { font-size:0.75em }*/
.filter-label { margin-right:1em; padding:0.35em 0.5em; background:#ddd; border-radius:0.25em }
.filter-wrap {
display:-webkit-flexbox;
display:-ms-flexbox;
display:flex;
flex-wrap:wrap;
position:relative;
overflow:hidden;
font-size:0.9375em;
margin-top: 1.5em;
margin-right: -0.75%;
margin-bottom: 2em;
margin-left: -0.75%;
}
.filter-item { display:-webkit-flexbox; display:-ms-flexbox; display:flex; flex-direction:column; /*was46.5%*/width:46.5%; padding:0.75% 1%; margin:0.75vw 0.75%; text-align:center; color:#fff }
.filter-item span { display:block; text-align:left; /*font-size:0.875em; color:#ccc; padding-right:5%*/ text-decoration:none }
.filter-item b { display:block; font-size:0.9375em; margin:1em 0 0.5em }
.filter-item b:before, .filter-item b:after { content:'~'; font-weight:normal }
.filter-item p { font-size:0.75em; color:#ccc; -webkit-flex:1 0 auto; -ms-flex:1 0 auto; flex:1 0 auto }
.filter-item i { font-size:0.9375em; font-weight:bold; margin-top:0.25em; }
.filter-item ul { list-style-type:none; margin-left:0; margin-top:2em; padding:0; font-size:0.75em; color:#000 }
.filter-item li { display:inline-block; line-height:2; padding:0 2%; border-radius:0.25em }
.filtered-inclusive .filter-item, .filtered-exclusive .filter-item, .filter-no-item { display:none } /* filtered-inclusive/filtered-exclusive class applied via js */
.filtered-inclusive .filter-item.selected, .filtered-exclusive .filter-item:not(.selected) { display:-webkit-flexbox; display:-ms-flexbox; display:flex } /* selected class applied via js */
.filter-no-item.filter-no-item-active { display:block; width:100%; background:#fcc; color:red; padding:1em 1.5em; margin:0.75% }
.filter-mask-active { position:absolute; top:0; left:0; bottom:0; right:0; -webkit-animation:filterMask 1s ease-in-out both; animation:filterMask 1s ease-in-out both }
@-webkit-keyframes filterMask {
0% { background:transparent }
50% { background:#fff }
100% { background:transparent }
}
@keyframes filterMask {
0% { background:transparent }
50% { background:#fff }
100% { background:transparent }
}
@media(min-width:10em) {
.filer-item { float:none }
.filter-item { width:99.75% }/*width:29.75%*/
}
@media(min-width:30em) {
.filer-item { float:none }
.filter-item { width:99.75% }/*width:29.75%*/
}
@media(min-width:40em) {
.filter-text, .filter-label, .filter-wrap { font-size:0.875em }
.filter-item { width:38.75% }/*width:29.75%*/
}
@media(min-width:56em) {
.filter-text, .filter-label, .filter-wrap { font-size:1em }
.filter-item { width:28.25% }/*width:21.5%....width:28.25%*/
@media(min-width:64em) {
.filter-item { margin:0.5em 0.75%; width:25% }
}
Bookmarks