Resolving some errors calculating margin, changed the margin to pixeles