158), in which case the floated parent will
expand to fill the available content width of the parent.4
It should also be noted that when a float (without a declared width) contains a
right-floated child element, it will also expand to fill the parent??™s available content
width in IE browsers up to and including version 7 (Firefox up to and including
version 2.0 also exhibits this bug but, the problem appears to have been fixed as of
Firefox 3.0 Alpha 6).
Therefore, it??™s always safer to specify an explicit value for the width of a floated
element where possible, and thereby to avoid the buggy behavior described above.
However, as long as you??™re aware of the problems mentioned above, you??™ll likely
4 A quick fix for this bug is to float the offending child element as well (where the situation allows
for it).
CSS Layout and Formatting
find that widthless floats can be useful in certain situations, such as fluid-width
horizontal menus.
The Ultimate CSS Reference 144
No matter how the content area is positioned, its height value will be equal to the
content height if no values have been declared for height, or for min-height and
max-height.
Pages:
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220