change css class for image dimension

- add dimension prefix
- for textimage add in outer div for best flexibility
- fix unit tests