A Devil's Trap or Key of Solomon, is able to trap a demon from below or above. Does it work from the side? At an angle? Are there any rules as to how it needs to be oriented, and at what range is it effective over?
In the Supernatural series, the show takes certain liberties with arcane lore, sometimes to make it more interesting or socially relevant, other times because it is visually more appealing or both. In the case of Devil's Traps or Keys of Solomon, a circular symbol used to imprison a demon within its confines, their tendency is to place it on the floor, usually hidden in some fashion. They have occasionally been placed on the ceiling and are no less effective for being drawn there.
Supernatural (TV Series) Lore
The trap can be painted, drawn in almost any substance from paint to blood, though more durable media make it harder to erase. Hiding the trap does not make it less effective and they can be created in media that can't be easily seen such as luminescent paint visible only under black light. The demon must be standing within the confines of the trapped region.
If the ceiling or floor is slanted is less relevant than the fact they are within the confines of the trap. Painting one on a wall, however, should not work. There are examples of traps used in exotic ways (such as a bag covering the head of a possessed human) whose efficacy is questionable but perhaps due to effects such as possession, it may make sense since the demon resides in the mind of the possessed, thus binding them in place and preventing escape.
The reason I suggest walls don't work have nothing to do with occultism and everything to do with practicality. If they did, there would be no reason to ever not paint one's home to include every surface with traps of all kinds. Bobby Singer had several through out his home, but did not cover every wall with them. There must have been some limiting factor even if we don't know what it was.
Classic Occult Lore
In keeping with rituals and lore, the floor or ceiling seem to be the only choices because they are used to bind the demon to the location and can be linked to the primal sources of Heaven or Hell. The lore surrounding such circles has almost always had them drawn on floors to keep demons at bay while negotiations took place for the demon to perform a service.
Once the demon or djinn had given its word, they could be safely released until they completed their task, then they would be allowed to return to Hell or their dimension of origin. Unlike the Supernatural Devil's Traps, in ancient demonic lore, a circle could be created for the summoner as well which would keep the demon at bay in case the original binding circle in which the demon was summoned failed. The hope was a demon would leave before the summoner starved to death.
I've always figured that the traps either create a cylinder with no top and a maximum length, or create a sphere sized trap centered on the symbol ( where the size of the sphere is dependant on the size of the symbol ).
If they create a cylinder with no top, then you'd want to have them on the floor or celing -- because then the only choices to escape are to dig or learn to fly. If you create a symbol on a wall, then with a cylinder they only have to start bashing down walls until they reach the limit of the cylinder and are able to escape. This theory would be supported if we've ever seen a demon escape a trap by evacuating the body it's possessing -- as a cloud of black smoke, it can fly up ( or down ) until it reaches the limit of the cylinder and escapes.
If they create a sphere shaped trap, then it doesn't matter where you put them -- but it makes more sense from a filming perspective to have them on the ceiling or floor, as it makes it a bit easier to do the reveal of "whoops, now you're caught in a trap because we hid it cleverly". Plus, people don't tend to look up.
I got the idea for the sphere sized trap after watching S02E06 "No Exit". When the brothers trap H. H. Holmes's spirit, they do it using a ring of salt. If the salt creates a cylinder type trap, then he'd be able to haunt whatever is above him -- which means that if a building is built above him he'd be able to haunt it. Not the best outcome. However, if a ring of salt creates a sphere sized barrier with the salt describing the circumference of the sphere, then it'd trap him a lot better.
Now, I know that salt barriers are a completely different thing from demon traps, but it's something that kind of makes sense to me. A sphere sized trap would account for the trap-on-the-burlap-bag in Izkata's answer, becasue then you'd have a sphere that encases the head, and not just a cylinder that goes through part of the head.
However, in the Season 1 episode where the exorcise Meg, her incorporeal form does seem to just leave -- it's not stuck within the trap ( unless I'm remembering wrong and they also banished her back to hell ). Which leads me to believe that the demon traps are cylinders, but they are open ended. The length of the cylinder is up for debate though.
Range has never been well-defined, but based on the screenshots here, I'd estimate that 3 or 4 body lengths is probably the maximum distance it can be effective, with it generally placed within 2 body lengths of the demon just to be safe.
As for orientations - almost anything goes. Floor and ceiling are simply the easiest, as it seems that for most Devil's Traps, the demon must be entirely within the circle to ensure its effectiveness.
There are at least two versions of the Devil's Trap in Supernatural: Heptagram and Pentagram.
Skimming through the screenshots above, whenever something needs to be protected, the Pentagram version is used. Whenever the goal is to trap a demon, it seems to be a toss-up as to whether or not the Pentagram or Septagram version is used.
Additionally, in 5x20, The Devil You Know, we have one instance of a Devil's Trap not having been drawn on a floor or ceiling:
This was apparently done to limit the powers of the demon in Brady while he was transported. Note that, obviously, not his entire body has passed through the rim of the circle. So it's certainly not a complete trap, but it does seem to indicate that any orientation goes, and will provide some sort of effect.
(This would explain why demons won't even allow a limb to touch the Devil's Trap if they know it's there - apparently even if they weren't actually trapped, it would limit their powers in some way)
The devi's trap was also used in Supernatural, Season 3, Episode 1. It was placed on the inside of a car trunk. It was also used previously on the Impala to turn it into a "lockbox" to keep the Colt (the gun that could kill anything) safe from demons.
When dealing with anything paramornal, we would do well to remember that the reason it is PARA normal is because it is beyond normal experiences... thus we may not always be able to measure and quantify everything. If we could, it might not be considered paranormal.
Depending on Supernatural, traps can be anywhere if they are either made with black paint or blood. Mostly, the traps that can prevent the supernatural from getting out of the trap can also prevent whatever is on the outside of the trap.