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

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Apr 2 17:01:17 CEST 2007


Peter Niederlag wrote: on 02.04.2007 10:37:

>>> The main problem is that csc delivers/renders by default with this
>>> markup/CSS:
>>>
>>> div.csc-textpic-intext-left-nowrap .csc-textpic-imagewrap {
>>> ...
>>>     clear: both;
>>> ...
>>> }
>>>
>>> This clearing sometimes affects containers that are way up in the DOM
>>> and destroys the nicely aligned columns of the site-layout.

>> The "easiest" way to solve that usually is to put the content area in a
>> float also. This will make the clear:both stop there and don't go any
>> further.
> 
> I know, that's the way we solve the issue now. But still it would make
> more sense IMO if the clearing only is applied where it is really
> needed. That is a corresponding floating element appears in the context
> of the textpic element.
> 
> What's the reason for not doing so? Is is technically not possible? To
> complex to handle?
> Anything else? [Me just being curious]

I think I don't get your question... You mean what is the reason for the
<div class="csc-textpic-clear"><!-- --></div> in the
"intext-left-nowrap" (and -right-) in css_styled_content?

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).

If I recall correctly, in the rendering of "below-center" we need that
clearer, else the text will start right after the images in Firefox (or
something like that...).

Anyway there have been reasons at that time for this implementation, but
they are not cut in stone and maybe you can prove that another setup
(XHTML + CSS) is much better and we can then consider a potential change
in that in css_styled_content.

Cheers,
Ernesto


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