+ 1
Why is container "relative" and box "absolute" and not vice versa?
JS lesson: DOM & events > Animation: I don't understand the positioning here. Shouldn't the green container have an absolute position on the page and the red box be relative to the container? Why is it the other way around? Can someone explain?
3 ответов
+ 3
Both can be relative or absolute , it doesn't matter. red box always stay inside the green container
0
Always take relative position on the parent or man term
0
I quote Lavish, don't know why the lesson specifies that as requirement