I have a simple CSS hover gallery which displays a photo when a user hovers on some text. It works fine as a stand-alone html, but when added to a wordpress page it does not works properly - the width of the image is limited to the with of the text which is a list element.

Any ideas to solve this please?