[TYPO3-core] RFC: Bug 5678: Missing clearer div in csc-textpic-intext-left/csc-textpic-intext-right
Sebastian Gebhard
sebastiangebhard at hoch2.de
Tue Apr 13 15:55:40 CEST 2010
Am 13.04.10 15:39, schrieb Jigal van Hemert:
> Sebastian Gebhard wrote:
>> -1 because markup clearing is bad
>> Use a .clearfix class instead for the parent container
>
> I wondered that myself and tried to add some style to the parent
> container when I tested this. Didn't work.
>
> Clearing div's are very common in HTML.
>
> Maybe you can help and supply the correct CSS?
>
The .clearfix is use in my personal standard css is taken from YAML
framework and looks like this:
.clearfix:after{
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.clearfix{
display:inline-block;
}
html[xmlns] .clearfix{
display:block;
list-style-type:none;
}
* html .clearfix{
height:1%
}
Don't ask me any details about it but when you apply it to a container
all included floating containers are catched and no additional markup is
needed.
I propose to add the following CSS to css_styled_content:
.csc-textpic:after{
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.csc-textpic{
display:inline-block;
}
html[xmlns] .csc-textpic{
display:block;
list-style-type:none;
}
* html .csc-textpic{
height:1%
}
This works for all my projects cross-browser.
More information about the TYPO3-team-core
mailing list