make relative ranges absolute. also correct span->div