def x2cx(x, e):
    """Transform from *x* value to column *x* index value, using the
    *e.css('cw')* (column width) as column measure."""
    # Gutter
    gw = e.gw
    cw = e.css('cw', 0)
    # Check on division by 0
    if cw + gw:
        return (x - e.parent.pl) / (cw + gw)
    return 0