Richard Cornford wrote:
Quote:
pr wrote:
Quote:
>SuneR wrote:
Quote:
>>It seems that if you try to document.write a block level element
>>inside an inline element, Firefox moves it outside the inline
>>element.
>Very sensibly; a div inside a label would be invalid HTML. See
><URL: http://www.w3.org/TR/html401/interact/forms.html#edef-LABEL>.
>>
Quote:
>>I have a stylesheet that makes the outputtet div inline, but
>>Firefox moves it no matter what.
>The stylesheet makes no difference to whether your markup is
>valid.
>
True, but if the intent is to have the effect of a block element inside
an inline element then the stylesheet can act the other way around, and
display:block; an inline element (such as a SPAN). And if there is a
desire to have an inline element then there was no reason for using a
DIV in the first place.
JFTR: A block-level element cannot be within an inline-level element. If it
is per markup, it is not Valid; if it is per CSS, the result is usually
design nonsense.
The only thing that could make sense is nesting one element that is
inline-level per default into one that is also inline-level per default
(which is usually allowed), and format the former element display:block
with CSS to hide it by default and show it on event. For example,
accessible tooltips (which will be featured by the next release of the
ECMAScript Support Matrix) can be created this way.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16