holder.js not working when placed in bootstrap 3 accordion

963 Views Asked by At

I have been trying to use the holder.js in a bootstrap 3 accordion. But the "size" text in the center of the holder.js image becomes 0x0 and the text is moved up to the top and not centered. If I take that same code and remove it and place it outside the accordion it works perfect.

Image of it in an accordion: enter image description here

Image of it outside an accordion: enter image description here

Any suggestions would be helpful. Thanks ahead of time.

1

There are 1 best solutions below

0
On

I had a similar issue where the text of the placeholder wouldn't appear on the center of the image. To fix it I added the 'width' and 'height' attributes to the image element.

<img width="200" height="200" data-src="holder.js/200x200" />