I don’t see the lines there before and after content, did you get this fixed?
Twenty Seventeen doesn’t have lines before and after content, but it does have big spaces between elements though.
Upon quick inspection, I suppose the line before content you referred to could be the space left over header area that’s been modified to adjust header (logo) image. If this is the line you mentioned, to fix this is to use other method for header image adjustment. The way it is now has flaw too, the logo gets cut off on left and right in small screen device. I remember there are quite a lot of this support questions/answers at the time this theme released, so you can try searching for it.
For the line after content, if you mean after footer, it’s just body background color this part will show when the page has not enough content to fill the screen viewport vertically. To fix this just assign the same green color as footer to <html>
element.
My personal view, as a sidenote here, this theme is getting old and we should use the newest theme possible to start a new project, this is to ensure compatibility and longevity of the project. The Twenty Nineteen or Twenty Twenty theme is great, of course there might be some parts need to be adjusted for the project but it’s true to almost any theme we choose.