The basic concept is:
![enter image description here][1]

**内側** means that spaces are divided by something like fence, and you're standing the inside ground, while **中** is like that there's a vessel and you're inside of it.

The interpretation of `Xの内側` and `Xの中` is different regarding the `X`. In the former, `X` indicates **boundary**, while in the latter, `X` is **container**. If `X` is something with inner room, then whoever in `Xの中` is likely to be in that space, but if `X` is a filled material, then they're likely to be packed within it.

---
**Random examples taken from Google image search:**

They are thought to be in **ガラスの内側** but not ガラスの中:

![enter image description here][2]

while he is thought to be in **ガラスの内側** or **ガラスの中**:

![enter image description here][3]

and they are thought to be in **ガラスの中** but not ガラスの内側:  
<sub>(well, these are actually ice cubes but never mind)</sub>

![enter image description here][4]

---
**Extra**  
There's other (mostly figurative) usage of **中**, that is you can refer what you see through apertures such as: 絵の中, 鏡の中, 画面の中 etc.


  [1]: https://i.sstatic.net/2LPMB.png
  [2]: https://i.sstatic.net/sgFHR.jpg
  [3]: https://i.sstatic.net/SpOCa.jpg
  [4]: https://i.sstatic.net/pEkGj.jpg