Hi guys,
I ran into this problem while positioning an element in a fixed navbar:
http://jsfiddle.net/HVHxq/34/
I have a fixed outer container div with a relative positioned inner div. However, the “top: 50%” does not work at all when I insert a 3rd div (id=middle) in between the outer and inner div. The weird thing is, the “left: 50%” DOES work!?
I understand how to fix this: I can use position:absolute on inner div, or I can remove the middle div, but that’s not the issue. The issue is I don’t understand WHY it behaves like this, so I’m hoping someone can explain why when there is an (id=middle) div between the (id=outer) and (id=inner) div, “top:50%” stops working but “left:50%” still does.
Thanks in advance