Would it be possible to have different background colors for even/odd blocks in same region using css?
So say, 1st, 3rd, 5th...block would have grey BG, while 2nd, 4th, 6th...would have blue?
Thanks
Amir
Thanks Gareth,
But what css should be used for blocks in a specific region to behave like that?
Thanks
Hi Amir,
You can use browser development tools and the example to work out the CSS within the 'aside' tag for the correct selector to use.
Cheers,
Gareth
The thing with blocks is that they are not always in the same list, e.g. there are things like "skip-block" between them etc. so it's not part of the same list of items in the div.
Something like this should work...I think?
#block-region-side-pre .block:nth-child(even) {
background: red;
}
#block-region-side-pre .block:nth-child(odd) {
background: blue;
}
#block-region-side-post .block:nth-child(even) {
background: green;
}
#block-region-side-post .block:nth-child(odd) {
background: yellow;
}
Edit: