I understand how to pass this step, I just don’t understand what the code is doing. If anyone could explain it to me I would be very grateful!
Here is the code so far, I am confused about the “. cap” part.
‘’’
.marker {
width: 200px;
height: 25px;
margin: 10px auto;
}
.cap {
width: 60px;
height: 25px;
}
.sleeve {
width: 110px;
height: 25px;
background-color: rgba(255, 255, 255, 0.5);
}
.cap, .sleeve {
display: inline-block;
}
.red {
background: linear-gradient(rgb(122, 74, 14), rgb(245, 62, 113), rgb(162, 27, 27));
}
‘’’
‘’’
< div class =" marker red " >
< div class = "cap “> < / div >
< div class =” sleeve "> < / div >
< / div >
‘’’
It seems like the cap class is moving the sleeve class further left, the less pixels it has.
for example at 30 px it goes to the left and at 90 px it will make the sleeve class go to the right more.
I just don’t understand how it’s doing this. I thought this is what margin was for and px was used for making things bigger or smaller, not moving things left to right.
I hope this makes sense, if more info is needed I will send it. Also thank you to anyone who took the time out of their day to read this! : )