Horizontal and vertical layout: protect against positions smaller than 1 (handled as percentages) or smaller than 0