On Fri, 18 May 2007, Bob Meetin wrote:

> http://dottedi.biz/codesamples/format_image_text.php
>
> I made the text extra small to emphasize the problem.  In the left
> column there are 2 Events boxes.  In the first I am letting the text
> flow around the right or left aligned images.  In the second I am using
> a fieldset to group together corresponding image/text. I know this is
> not to standard, but it works and I don't have a CSS solution.

As I suspected (and wrote), this seems to be a simple case where you just 
need to set clear: both for an element after the first paragraph.

For example, use <p class="new"> in the infobox when you start a paragraph 
that should not appear on the left or right of a preceding image, and use
.new { clear: both; }
in CSS.

Some extra markup like a class attribute is probably needed, since you 
might not want to deal with _all_ <p> elements inside an infobox that way. 
However, if you expect most paragraphs to be of such a kind, you could 
instead use a class attribute, say <p class="cont"> for those paragraphs 
that continue the text related to an adjacent image, so that clearing is 
_not_ desired for them, and use

.infobox p { clear: both; }
.infobox p.cont { clear: none; }

This should keep extra markup to a minimum.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

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

Reply via email to