To make a brim that you will sew together later, simply cast on, leaving a long tail, and knit for however long you want your brim to be. For an adult sized hat, I'd suggest 2" or so. Once it's long enough, purl 1 row.
Now knit the hat as usual and with whatever pattern you've chosen, measuring length from the purl row, not the cast on row. The rolling is normal because it's all stockinette.
Once you're finished, turn the hat inside out. Fold the brim back, making sure the fold is on the purl row. Use the long tail to sew the hem to the hat. I like to go through the front v only, and then one reverse stockinette bump from the other side of the hat. They make their own little v once you get them both on the needle. I go through every other one, sometimes every third one if I'm using a smaller yarn.
|Bottom stitch on needle is front v of cast on, top stitch is purl bump from body of hat|
Variation: Knit Together Brim with Provisional Cast On
This brim will look exactly like the sewn brim, without requiring any sewing. Instead, cast on using a provisional method (I like either the crochet provisional cast on or the invisible provisional cast on.)
Once you've cast on provisionally, knit 2" and keep track of how many rows you knit, purl 1 row, then knit the same number of rows as before the purl row.
Place the provisional cast on onto a needle (doesn't have to be the same size, mine is a US 6) and fold it up inside the hat so that wrong sides are together.
Knit one stitch from the working needle and one stitch from the provisional cast on needle together. Continue doing this all the way around, sealing the brim.
|Due to the way I picked up the cast on stitches, I am ktbl because the left leg is in front|
|The hem, fully attached|
Variation: Knit Together Brim without Provisional Cast On
This brim is similar to the previous brim, with one important distinction. Just cast on as usual. Knit 2" and keep track of how many rows you knit, purl 1 row, then knit the same number of rows as before the purl row.
Tuck the end of the hat up so that the wrong sides are together, and find the first stitch you cast on. Insert your left needle tip into that stitch and knit 2 together. Again, I like to only pick up the loop that will be on the outside, as I find it neater and more comfortable on the forehead.
|The cast on is a little curled up, just uncurl and look for the long cast on loop|
Now work the hat as usual, measuring from the purl row, which will be at the bottom of the hem.
Variation: Picot Brim
You can work this with either a provisional cast on or without. You can even just sew it up after you finish the hat, so any of the methods listed above work! In this case, I did not use a provisional cast on even though I probably should have because black is difficult to see when picking up stitches. I usually make these smaller than the sewn or knit together brims, you can change the number of rows knit to whatever you like. Knit 4 rows. Work one row of (yo, k2tog) around. Knit 4 rows.
|See the eyelet circles?|
Voila! Several different ways to get that sewn hem look.