dynamic change margin