Find the white paper here on CD somewhere called "PID without a PhD", that will help you understand the idea behind a P controller. Then search the term "PID" which is what you are looking for - just that your I and D terms will be ignored.
I'm not a programmer, and i know little about the EV3, but...
<Pseudocode>
Code:
Does sensor see line?
Yes: Move forward a little
No: Turn a little
repeat until you reach 'goal'