I am trying to position a box on the top right screen of my browser using the jquery ui position plugin as,
$('.container').position({
my : 'right top',
at : 'right top',
of : 'body'
});
This works properly and is getting displayed on the top right. But i like to give some space between the box and the right side screen edge. So, i added margin-right
position to the container. Immediately, the box moved from the top right corner to left corner.
Plunker code is here.
Why does margin property affect the container's absolute coordinates?