Hi everyone. I am trying to achieve an expanding caption box that will go under an image, and will be the size of that image based on their parent div which would be based on the size of the image.
so i wrote this html which puts both image and caption inside a div which is the parent. <div id="image_and_caption"> <img src="<?php echo ROOT_PATH ?>images/image_2.jpg" alt="image_2" /> <div class="caption"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <div class="caption_bot_left"> <div class="caption_bot_right"></div> </div> </div> </div> the css is just for the "caption" .caption{ margin-left: 10px; margin-right: 10px; width: auto; background-color: #eaeaea; } .caption_bot_left{ background: url('../images/bg_caption_left.gif') bottom left no-repeat; } .caption_bot_right{ background: url('../images/bg_caption_right.gif') bottom right no-repeat; padding-bottom: 7px; } I was under the impression that if specified a margin-left, a margin-right, and set width to auto that the width would become the width of its parent (image_and_caption). right now i just got a bar going across the page as if width were set to 100%. I also tried removing the caption_bot_left" and "caption_bot_right" for the sake of simplicity but it did not help. Thanks Sandy ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/