Knitting borders around stockinettes prevents the edges from curling up. Knit borders with tips from a knitting teacher in this free video on yarn crafts.
So, if you're making a scarf and you're doing stockinette, you're going to need to make a border around it otherwise it's going to curl. Because stockinette, left to its own device, it just curls right up. So, when you create a border you can do the garter stitch, so you would knit a couple of rows even. Knitting every row. And then when you finish knitting every row and you create a bottom border, you would continue on just doing the sides. So what we're looking to create is something like this, where you've got garter on the bottom, here. And after about an inch or so, or whatever you like for design purposes, you're going to switch and do knitting, both front and back on your side stitches and doing stockinette where you knit a row, purl a row on the front. So, for that kind of a scarf, basically, you would knit across one row even, and then on your purl side you would knit the first three and then you would purl. In this case I'm choosing a three stitch border, you would purl to your last three. Go along, and then when you get to your last three. Here I am, you would knit them and that would be the beginning of a border. So, you can see there's three purl bumps there, there's my stockinette, and there's my purl bumps. And, if I kept on this way, it's going to look like this. And, if I did a seed stitch border, it would look like this where you can see you've got the alternating stitches on either side, and then there's garter at the top. And that will keep it from rolling and it'll lie flat.