Cast on 12 stitches and knit 4 rows of knit one purl one rib, remembering to slip the first stitch of every row as if to knit, without knitting, to maintain a nice neat edge. If you do not do this you may get a sloppy loopy edge which you won't like!
Step 1: Creat the First Buttonhole
Cast off 3 stitches (in rib, i.e. purlwise, knitwise and purlwise) and continue knitting to end of row in rib, starting with a purl stitch.
Next row knit 5 stiches in knit one purl one rib, starting with a knitted stitch. Cast on 3 stitches onto the right handle needle (you may have to turn the work around, depending on how you personally cast stitches on). Try not to make these stitches too "loose and loopy"!
When you have cast on the 3 stitches on your right hand needle continue to work across the piece in rib across the left hand needle, starting with a knitted stitch.
Step 2: You Have Created a Hole (on Purpose!)
Note: I have knitted the right side front band (for women's garments). You will need to create a matching left side band, on which you sew the buttons. The easiest way to get your two bands exactly the same length is to knit them both together on the same needles with separate balls of yarn and omitting making the button holes on the left side band, when you open and close the hole by just knitting two rows of rib.
When you cast off your ribbed bands, cast of in rib, i.e. knit one plain, knit one purl, pass knit stitch over, knit one plain, pass purl stitch over. It it much neater than just casting of plain-wise.
When finished these two bands will be sewn neatly in place on each side of the two cardigan or sweater fronts.