1. There were 40 seats for older children in the front and benches for little children at the back.

2. There were 40 seats for older children at the front and benches for little children in the back.
--------------------------------------
Which preposition do we have to use? Are both OK? At the back, in the back, at the front, in the front......

Both are correct.