Let $g\in C^0[0,1]$. Minimize $||f-g||_{\infty}$ for all $f\in L^\infty [0,1]$ such that $\int_0^1 fdx = 0$.
Considering $|\int_0^1 g-f dx| \ge |\int_0^1 gdx|$ by the requirement on $f$. In the trivial case $\int_0^1 g dx = 0$ so we can pick $f=g$. Not sure how I can deduce something about $f$ in the general case.
The inequality $$\|g-f\|_\infty \ge \left|\int_0^1 (g-f) \,dx\right| = \left|\int_0^1 g\,dx\right|\tag{1}$$ is half of the solution. The other half is the realization that the function $$ f(x) = g(x) - \int_0^1g $$ has zero integral, and attains equality in $(1)$.