Shadowbox is a media viewer that prides itself on being standards compliant, flexible, and easy to use. In most of my exploration of different pop-up style media viewers, it seems that I would have to agree with their stand and say that at this point, Shadowbox is probably my favorite.
One of the limitations of shadowbox is the use of captions. Since many people have different views about what is the caption, many are satisfied with using the image title as a caption. If that is the case, shadowbox does it out of the box. However, if you would like an image title AND a caption, then you may have to dig a little deeper.
While exploring this limitaiton of the application, I found many forum posts in the support section about this very topic. It is nothing new. The vast majority of conversations that I have found about this don't have any real answer. Others say that you can only include a caption if it is a fixed height, which lead me to my first discovery - a solution!
Near the bottom of this post, a user named 'Zimmer' has posted a fix to this problem. This updated code will allow you to use a rev attribute in your link, which will be translated into a caption below the shadowbox navigation. This is an excellent solution, however it still requires a fixed height for your caption. In most cases, due to the small font size and the number of lines allowed, it would not be a big deal - you probably won't have more than a few sentences as your image description.
But I wanted to take this a step further. My ideal caption would be fluid in height. It would also be positioned to be an overlay at the bottom of the image itself. So I have created my own hack of Shadowbox to give the caption this positioning. This version would require some browser testing before using on a live site, or some editing of the shadowbox.css file to style the description the way that you want it.

Leave A Comment