This quirks mode behavior emulates
the buggy behavior of much older browsers. Usually, these properties have to be
specifically applied to the table element, although a better approach would be to
avoid the issue altogether by using a doctype that causes the browser to use standards
mode rendering. To learn more about doctypes and rendering modes, see Standards
Mode, Quirks Mode, and Doctype Sniffing (p. 17).
font-size Inheritance
In the above example, we used a font-size of 20px on the parent div element. That
value was inherited by the div??™s child elements, but can you imagine what would
happen if we set the font-size property of the div element to a percentage size:
div {
font-size: 130%;
}
At first glance, you may be thinking that the p element inside the div will inherit
a font-size of 130%, and will therefore be 130% bigger than its parent. You don??™t
need to worry, though, because this is taken care of for you: the p element will
inherit only the actual computed font size of the parent??”not the 130% scaling
factor??”and will therefore be the same size as the parent.
Pages:
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206