Calculate margin for webcontent