update slider height on small device and format code