From: MG on 30 Apr 2010 11:46 What is a non-replaced element; and what is a replaced element? For example the spec says that the width property does not apply to a non-replaced inline-level element (section 10.2). Thanks MG
From: Ben C on 30 Apr 2010 14:47 On 2010-04-30, MG <nospam(a)nospam.com> wrote: > What is a non-replaced element; and what is a replaced element? A replaced one is one whose contents are "replaced" by something that isn't just the normal boring text and solid colours. Images, objects, flash plugins, GUI widgets (buttons, textboxes etc) are all "replaced". > For example the spec says that the width property does not apply to a > non-replaced inline-level element (section 10.2). Actually they should tighten up that section. Width does apply to inline-blocks which are inline-level (according to the definition given earlier of inline-level, itself badly written because inline-blocks do form new blocks of content). Basically the "applies to" part of 10.2 and the text below contradict each other, when you consider that inline-blocks are inline-level but not inline. Width doesn't apply to anything that's display: inline and not replaced is what they really mean. Note also that replaced display: inline is _exactly_ the same as replaced display: inline-block. So really it would make more sense to just call those inline-blocks and then simply width doesn't apply if display is inline.
|
Pages: 1 Prev: Trying to understand selectors Next: Active menu items in ul/li hierarchy (breadcrumb) |