  A \emph{chain} in the unit $n$-cube is a set $C\subset [0,1]^n$ such that for
every $\mathbf{x}=(x_1,\ldots,x_n)$ and $\mathbf{y}=(y_1,\ldots,y_n)$ in $C$ we
either have $x_i\le y_i$ for all $i\in [n]$, or $x_i\ge y_i$ for all $i\in
[n]$. We show that the $1$-dimensional Hausdorff measure of a chain in the unit
$n$-cube is at most $n$, and that the bound is sharp. Given this result, we
consider the problem of maximising the $n$-dimensional Lebesgue measure of a
measurable set $A\subset [0,1]^n$ subject to the constraint that it satisfies
$\mathcal{H}^1(A\cap C) \le \kappa$ for all chains $C\subset [0,1]^n$, where
$\kappa$ is a fixed real number from the interval $(0,n]$. We show that the
measure of $A$ is not larger than the measure of the following optimal set: \[
A^{\ast}_{\kappa} = \left\{ (x_1,\ldots,x_n)\in [0,1]^n : \frac{n-\kappa}{2}\le
\sum_{i=1}^{n}x_i \le \frac{n+ \kappa}{2} \right\} \, . \] Our result may be
seen as a continuous counterpart to a theorem of Erd\H{o}s, regarding
$k$-Sperner families of finite sets.
