Dynamic containers

Hello all

VERY new to ruby on rails here.

At one part of my site, a fairly large image is produced. It is
sometimes larger than the container that I would like to put it in
(which is defined in the layouts). Is it possible to change the style of
the container if the image is too large?