Every taxi way and Apron have (normally) yellow taxi guide lines. As long as you're going straight, it's no big deal to keep the aircraft centered on the line. Problem starts in tight turns (eg. in JFK). There you can't follow the line any more like this. It's like driving a long truck. If you would follow the line, the turn would be too tight and you'll end up dragging your mainwheels through the gras inside the curve.
The longer the plane, the more you have to watch out. The A340-600 has 2 taxi cams that deliver their picture to 2 screens in the cockpit to assist you taxiing. I think one if the 777 models uses the same aid.