A fence would not work at all. There couldn't be one high enough or deep enough.
If you want to go the fencing route, you can get cat proof fencing.

Here is a link to cat proof fencing toppers (i.e. Attaches to standard fencing)
http://www.catfencein.com

Also Kimlovescats fella made his own version of the above fencing, I'm sure she'll talk you though making it, if you are interested.