Photo collage inside the glide app.is it possible? May be use of css?
All odd elements would be having this code
div[id*=âscreenScrollViewâ] > div > :nth-child(1) > div > div {
width : 50%;
height : 50%;
background : transparent;
margin-left : 0.3px
}
All even elements would be
div[id*=âscreenScrollViewâ] > div > :nth-child(2) > div {
width : 50%;
height : 50%;
margin-top:-187.5px;
margin-left: 187.5px
}
So my details view has 4 images
the code for the same is:
<pre><span><style>
div[id*=âscreenScrollViewâ] > div > :nth-child(1) > div > div {
width : 50%;
height : 50%;
background : transparent;
margin-left : 0.3px
}
div[id*=âscreenScrollViewâ] > div > :nth-child(2) > div {
width : 50%;
height : 50%;
margin-top:-187.5px;
margin-left: 187.5px
}
div[id*=âscreenScrollViewâ] > div > :nth-child(3) > div > div {
width : 50%;
align: end;
margin-left : 0.3px
}
div[id*=âscreenScrollViewâ] > div > :nth-child(4) > div {
width : 50%;
margin-top:-187.5px;
margin-left: 187.5px
}
Does this work the same way in desktop view? Good work.
Not really! The margin-left and margin-top are different on a bigger screen!
All about finding a sweet spot!
I have tried your CSS inside GDE and it doesnât work.
You might try the one below. This CSS may work for any size of the screen.
<pre><span><style>
div[id*='screenScrollView'] > div > :nth-of-type(1) {
width : 50%;
height : 50%;
background : transparent;
margin-left : 0%
}
div[id*='screenScrollView'] > div > :nth-of-type(2){
width : 50%;
height : 50%;
margin-top:-50%;
margin-left: 50%
}
div[id*='screenScrollView'] > div > :nth-of-type(3){
width : 50%;
margin-left : 0%
}
div[id*='screenScrollView'] > div > :nth-of-type(4){
width : 50%;
margin-top:-50%;
margin-left: 50%
}