Prev | Current Page 230 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"

We say an element gains a layout or has a layout when the
hasLayout property has the value true.11
When an element has a layout, it is responsible for sizing and positioning itself and
possibly any descendant elements.12 In simple terms, this means that the element
takes more care of itself and its contents, instead of relying on an ancestor element
to do all the work. Therefore, some elements will have a layout by default, though
the majority do not.
Elements that are responsible for arranging their own contents will have a layout
by default, and include the following (this list is not exhaustive):
?–  body and html (in standards mode)
?–  table, tr, th, td
?–  img
?–  hr
?–  input, button, file, select, textarea, fieldset
?–  marquee
?–  frameset, frame, iframe
?–  objects, applets, embed
The main reasons Microsoft gives for the fact that not all elements have a layout by
default are ???performance and simplicity.??? If all elements had a layout by default, a
detrimental effect on performance and memory usage would result.


Pages:
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242