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

Ernesto Baschny [cron IT] ernst at cron-it.de
Tue Mar 27 14:54:24 CEST 2007


Peter Niederlag wrote: on 13.03.2007 17:06:

> first of all I am stilla mazed by the really nice and good markup
> css_styled_content delivers nowadays.
> 
> However we are still facing some problems on CSS based multi columns
> layouts using float-technics with the textpic element. ;(
> 
> 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.

Here are some other "tricks" to play with floating content in div-based
multi-columns layouts: http://www.yaml.de/artikel/xhtml/floats.html
(german only)

Sometimes it is not possible or you don't want the whole "hassle" that
comes with doing this, mainly if you are using liquid design for the
content area and cannot specify a fixed width. In that case I would opt
to go for a simple layout table, which basically does everything one
wants without any needed hacks. If they are not nested and the table is
linearizable, this is even accessible.

Cheers,
Ernesto


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