[TYPO3-content-rendering] still some problems with clear:both

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Apr 18 14:04:46 CEST 2007


Peter Niederlag wrote: on 10.04.2007 10:41:

>>> The main reason is to separate the one content element from the next
>>> one, even if the image is larger than the text part. Mainly because it
>>> always have been like that ("backwards compatibility" with the old table
>>> variant of IMGTEXT).

> IMO we only need a clear if we have some elements (pictures) before that
> really have a float applied. AFAIR we had the problem that there was a
> clear but for some reason there was no element that  had an open float
> applied. therfor the clear was applied to our general site-layout, which
> was the next floating element.

Not really true, because a clear:both always clears ALL floats, no
matter how many came before it. So if your left-side border is a float,
and you are not inside a float yourself (content), the clear:both will
make the next content jump right down past your left-side border. It
doesn't matter if there has been an image before that was floated or not.

Currently you get a <div class="csc-textpic-clear"><!-- --></div> in all
but intext-right and intext-left variants. I am not sure why, maybe this
is what Masi meant with "missing clears". I am not sure why those two
don't have a clearer.

All other variants where we have images have a clearer, because they are
needed for some reason or the another. The images in textpic are ALWAYS
floated to left:

/* DIV: This will place the images side by side */
DIV.csc-textpic DIV.csc-textpic-imagewrap DIV.csc-textpic-image { float:
left; }

This is needed to achieve the multi-column look. It doesn't make sense
when you only have 1 image, but this case is handled in the same way as
all others.

Cheers,
Ernesto


More information about the TYPO3-project-content-rendering mailing list