Create custom asymmetrical pageList grid
Permalink
Layout for example (or see the attachment)
[1][ 2 ] [1]
[1][ 2 ] [1]
Someone have idea how to create "forEach" loop + some code that do this task in elegant way? "each X loops do this task". This is also useful for galleries.
Example of pagelist output with 6 pages items:
[1][ 2 ] [1]
[1][ 2 ] [1]
Someone have idea how to create "forEach" loop + some code that do this task in elegant way? "each X loops do this task". This is also useful for galleries.
Example of pagelist output with 6 pages items:
//Html div class= One div class= One div class= Two div class= One div class= One div class= Two //css .One {width: 25%}; .Two { width:50%} ;
this can be solved with nth-child CSS pseudo selectors. are you familiar with nth-child selector?
so if all of these are divs in a specific "wrapper" you could say
#wrapper div:nth-child(3n+0) {
// whatever the CSS for each 3rd element
}
that will work
#wrapper div:nth-child(3n+0) {
// whatever the CSS for each 3rd element
}
that will work
Thanks. I will try this. I know this selector - but i think in the start about PHP solution (some counter mabye). I think you right.
The problem with 3n its always repeat (in the example the "next" loop is with flip layout)
The problem with 3n its always repeat (in the example the "next" loop is with flip layout)