Good evening,
I'm currently working on a designing project and looking to get something like this : Menu
To do so I used this code in SASS :
&:nth-child(1){
left: 10px;
}
&:nth-child(2){
left: 15px;
}
&:nth-child(3){
left: 30px;
}
&:nth-child(4){
left: 35px;
}
&:nth-child(5){
left: 50px;
}
&:nth-child(6){
left: 55px;
}
&:nth-child(7){
left: 70px;
}
&:nth-child(8){
left: 75px;
}
&:nth-child(9){
left: 50px;
}
&:nth-child(10){
left: 55px;
}
&:nth-child(11){
left: 30px;
}
&:nth-child(12){
left: 35px;
}
&:nth-child(13){
left: 10px;
}
&:nth-child(14){
left: 15px;
}
Right now, it is hard-coded, and the layout is not the same if the numbers of elements from the list is different.
So I'd like to do this dynamically, how can I do so?
I thank you in advance for your help,
Alex