you gonna have to make as many CSS as you have list items, if the list is not fixed, you have to use script to find that elemnt
ok. I understand. I was also wondering if I am able to set an image in a list as its background? I’ll attach an image…
I was wondering if I could set whatever that image is to the background. Is there some piece of code like…
[data-test=“list-item”] .imageStyle {
}
yes, image or color, it is a similar process… but you can use tiles list for that
Is there anything I can do to resize/change the image? I’d like to make it just a bit bigger and shift it a bit to the left.
did you look at my Code BOOK? you can find all answers there… and play with settings by clicking the edit button
I looked at the book, but couldn’t find anything on resizing the image - maybe I just can’t find the right post.
click edit icon and adjust width or position
Is that the name of a post in the CodeBook?
what do you mean?
Never mind. I figured it out
Back to the nth child thing - what would the code look like using @ThinhDinh 's example if I wanted to turn the background of the second item green? I know for a list in HTML you can use li: nth-child(2n){} to target every other item, but am not sure how it applies here.
I think each item has a dynamic title name attached to it, so you don’t have to use the nth-child approach for this. I’ll get an example for you when I have time.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.