Include the margin when calculating height and width of popover