Hi all,

I have a page posted here...

http://www.seafoodlab.cmast.ncsu.edu/aboutus.html

...in which I am playing with the idea of making a div with class "photobox" for photos (the black and white one on the left) which will contain a photo caption.

The css is as follows:

.photobox {
   float: left;
   margin: 10px;
   font-family: Arial, Helvetica, sans-serif;
   color: #35519F;
   font-size: 11px;
   border: 1px none #35519F;
   padding: 5px;
   width: 200px;
}

.photobox img {
   display: block;
}

This works great so far for this one picture, but the problem is that I have to define the width of the div based on the photosize. So, the photos will either have to all be the same width, or I'll have to creative various photoboxes for various photo sizes.

Is there anyway to have the div stretch automatically to accommodate photo size (with the caption underneath, since the img is defined as a block level element) that doesn't involve javascript or the like? I really like doing the captions this way rather than as part of the image, for obvious reasons.

Any help appreciate,

linda

--
Linda Dunn
Purplegenie Design {web+graphics}
[EMAIL PROTECTED]
252.422.9393


______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to