[thelist] How to get <p> to wrap in floating div
Ellen Kanner
ellen.t.kanner at Dartmouth.EDU
Thu Mar 29 11:12:52 CDT 2007
Or is this a pipe dream?
The text is stretching out the width of a non-fixed width div. It
seems the only way to recover this is by fixing the width of the div,
but since this is in a CMS, the image width will always be an
unknown. I thought padding/margins would fix, but didn't
See: <http://www.dartmouth.edu/~classics/>
Issue appears in all browsers.
Here's the css:
#b-content .b4
{
float: right;
margin-left: 20px;
padding: 0 5px 3px 5px;
margin-top: 4px;
}
#b-content .b4 p
{
font-size: .75em;
padding-left: 4px;
padding-right: 2px;
margin-right: 0px;
padding-top: 0;
margin-top: 0;
}
#b-content .b4 img
{
padding-left: 0;
padding-right: 0px;
margin-left: 0;
padding-top: 0;
margin-top: 0;
}
and the markup:
<p><img title="lion" alt="lion" border="0"
src="http://www.dartmouth.edu/~classics/images/colossal marble
lion.jpg" /><br />
Dartmouth Classics students in front of a colossal marble lion at the
British
Museum, March 2007</p>
Help.
ellen
More information about the thelist
mailing list