Let $M$ be a proper closed linear sub space of a normed linear space $X$. If $X$ is finite dimensional, it's a well known result by F.Riesz that there exists a unit vector $x$ such that dist($x,M$)=$inf_{m\in M}\|x-m\|=1$.
This need not be true if $X$ is infinite-dimensional. I have to show that the choice of
$$ X=\{f\in C[0,1]:f(0)=0\}\\ M=\{f \in X: \int_{0}^1 f=0\} $$ provides a counter example.
For every unit norm function $f_0$ in $X$ , I tried designing a function $g_0 \in M$ such that $\|f_0-g_0\| < 1-\epsilon $ or $\|f_0-g_0\|>1+ \epsilon$, but haven't made much progress.
Here is my solution :
Assume $f_0\in X$ and $\|f_0\|_\infty=1$. Assume without loss of generality that $c:=\int_0^1 f(x)\,\mathrm dx>0$. As $f_0(0)=0$ there exists $a>0$ such that $|f_0(x)|<\frac12$ for $0\le x\le a$. Then $$c\le \int_0^1 |f_0(x)|\,\mathrm dx\le \int_0^a |f_0(x)|\,\mathrm dx+ \int_a^1 |f_0(x)|\,\mathrm dx\le \frac a2+1-a<1$$ Now consider functions $g$ of the form $$g_{q,m}(x)=\max\{f_0(x)-q,-mx\} $$ with $c<q<1$ and $m>0$ and see how $\|f_0-g_{q,m}\|_\infty$ and $\int_0^1g_{q,m}\,\mathrm dx$ behave as $q\to 1$ and $m\to\infty$ (you may have to pick a suitable path to $(1,\infty)$ though).
Why $g_{q,m} \in M $ ? why $\int_0^1 g_{q,m}(x)=0$ ? Why $1< \|f_0-g_{q,m}\|_\infty$ ? And why $\int_a^1 |f_0(x)|\,\mathrm dx\le 1-a$ ? We have $\max (f, g)=\frac{1}{2}(f+g+|f-g|)$ then $g \in C[0,1]$ and $g(0)=0$