develop a robost algorithm for auto-adjust the padding-left style of geci