Do you have a room in your house that you just don't want your dog to go into? At my house it's the laundry room. I keep the litter box in there, along with all the cat food (indoor and outdoor cat food). Just things I don't want to worry about my dogs getting into. There's no need for them to be in there, so I taught them that room is off limits.
It's a very simple process...consistency is the key.
The purpose of the nylon is to create a barrier for the dog, but not stop them from being able to see into the room. By keeping the door closed all the time, it's not allowing the dog to make the choice to stay out when they have the opportunity to go through. The taller the dog, the more nylon strips you would use and the higher they would go on the door frame. The nylons strips should be as tall, or slightly taller than, your dog. If you're doing this with a puppy, the nylon strips should be spaced as high on the door frame as they puppy will get. For tall breeds, such as a Great Dane, you would space the nylon strips out a little more (3-4 inches apart) and possibly add a 6th strip.
As your dog becomes more comfortable with the nylon strips, remove one of the strips. If your dog tries to go into the room after taking the strip down, then you moved too fast. Put the strip back up for about 3-4 weeks, and then try again. By the time you get to the last strip regardless of how tall your dog is, they should be able to at least hop over the strip. The purpose of this last strip isn't to prevent them from going into the off limits room, but just to remind them to stop.
If you click on the items, it will take you to an Amazon page. Please don't feel obligated to buy from Amazon, I just wanted to show you what I was talking about. This should cost less than $30 per door frame for the nylon and velcro, and you should be able to get an X-Mat for less than $15 each.