Put the cat food up on the counter, if your dogs can't reach the counter.

Or, put the cat food and litter box in a room, and put a baby gate up, leaving enough room for the cats to go under (or over) but the dogs cannot.

Or, put a cat door in the door to a room.

Or, put the food and litter box in the corner of a room, and put a large peice of furniture at an angle across the corner, leaving only a very small gap between the furniture and the wall ... so the cat can get in but the dog cannot.

Cats are carnivores, their bodies have evolved over eons to digest and need only meat. Dogs, however, are omnivores, like humans. Their bodies have evolved over eons to digest and need meat, vegtables, grains, etc. Just as your body would be harmed from eating only protein, so will your dogs. Kidney failure is the most common - and fatal - disease associated with too high protein levels in dogs.

So, it is crucial you find a way to keep your dogs from eating cat food on a regular basis.