[TYPO3] csc-textpic: problem with floats
Tapio Markula
tapio.markula at atwebteam.com
Tue Mar 20 19:37:43 CET 2007
Christopher
>> 1) the height of the container for floated elements doesn't grow
>> automatic - very bad problem
>> for several rows of images because you should set the height of the
>> container taking account the *maximum* height. Tables don't have this
>> problem
>
>
> Several simple solutions:
>
> a) float the container.
it may have height problems
> c) add some content to the floated element using the :after pseudoclass [1]
that doesn't work with MS IE - not really usable
>> 2) height of divs are different. If you try to set height as 100% that
>> will fail in many situations. Tables don't have this problem
> Wrong. Setting the height of a div to 100% never 'fails'. Percentage
> heights on elements in CSS are considered to be percentages of the
> element's /parent/, except in the case of the HTML element which has
> no parent element in the sense that all others too. Setting 100%
> height on the HTML element will set the element to the height of the
> WINDOW, not of the CONTENT.
I know
> The two problems people usually encounter with 100% heights are a)
> that the element does not occupy the full height of the page's
> content, and b) that some parent item has no explicitly set height so
> the element fails to behave as expected.
for MS IE height == min-height, which mix the calculation even parent
elements might have height values. Some elements might then be higher
that the defined height.
With Firefox, Opera etc. which support min-height, using that cause also
problems. If you set fixed height, some content might overlap other
content.
Whether you can do anything
> or not about (a) depends a lot on the layout in question. (b) is
> easily fixed by specifying the heights of the parent elements.
doesn't work fully reliable
>> Because of serious layout problems I have sometimes changed DIV layout
>> into conventional tables. Concening the latter problem DIVs are usable
>> if you don't need to set background properties.
> ...makes no sense. Background properties behave on divs the same as on
> all other elements. If you mean because of the idiosyncracies of the
> heights of floated elements, see above.
I don't believe that with floated elements can ever solve all height
problems.
floating to top of parent doesn't always work in MS IE
More information about the TYPO3-english
mailing list