Hmm, actually, my initial code was correct (made the edit again).
The problem was that you still have the site set to display in separate containers.
If you want the whole site to display in one container, but the homepage, you want to go to “Appearance > Customize > Layout” and set the content layout to “One Container”.
Then add the code above.
That should do it.