Gregory Charles Rivers wrote:
hello everyone.
I am trying to create images with captions. I have code that works fine
except that I can find no way to centre the div within my container div.
any ideas?
Gregory,
I have used the following successfully. I believe this is what you are
trying for. The right and left part is because the image was in a block
of text and the text wraps around it either to the right or to the left,
depending:
div.right {
width: 352px;
margin: 6px 0 4px 20px;
padding: 0;
float: right;
}
div.left {
width: 352px;
margin: 6px 20px 4px 0;
padding: 0;
float: left;
}
/*this is the caption*/
div.left p, div.right p {
font: 10px Arial, Helvetica, sans-serif;
text-align: center;
margin: 0;
padding: 0;
}
HTML
<div class="right"><img src="images/ventana/2005/salt2.jpg" width="352"
height="210" border="0" alt=""></a>
<p>El Saltamontes</p></div>
I hope that helps,
Don Hinshaw
______________________________________________________________________
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/