The disclosure relates to a cerebrospinal fluid (CSF) shunt for treatment of hydrocephalus, comprising a valve having an inlet port and an outlet port, which ports are for draining CSF, and a control port for regulating the drainage of CSF through the valve according to a hydrostatic pressure provided to the control port, which hydrostatic pressure is dependent on the body position of the patient. The disclosure further relates to a method for treatment of hydrocephalus comprising regulating drainage of CSF based on a hydrostatic pressure that is dependent on the body position of the patient.