Cross-stitch mesh from craft stores is what I use. Then I simply enclose all four sides in plastic poster hangers and if using substrate, build it up on either side of the divider to hold it in place.
I find with the very fine cross-stitch mesh bettas can't see each other as well so this cuts down on stress.
This is not a betta tank, but shows how I divide my tanks when I need to. Dividers are a bit crooked because the lid is pushing down on them, but ignore that haha fish are non-aggressive in there.