fix the calculation of the colSpan

Firefox: operator % produces in some cases results > "1"
Safari: operator % produces in some cases "1" as result