|
Posted by Jukka K. Korpela on 07/11/07 17:58
Scripsit Jonathan N. Little:
> Neredbojias wrote:
- -
>>> form { display: inline; }
>>
>> One thing I'm not clear on. If that technique is utilized, can one
>> still include a block-level <div> (for instance) within the form?
It's not clear (at least by my reading of CSS specs) what should happen if
an element with display: block appears inside an element with display:
inline. Hence, I would avoid it and set display: inline for any block inside
a form.
> My understand a block level element must be between the form and the
> form input elements
>
> <!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form -->
That's by the HTML 4.01 Strict rules. Browsers don't really care whether you
are Strict or not (though they may care about a doctype declaration where
you _claim_ to be Strict), so what matters is whether you facturally have
blocks inside a form.
> so you would need to add to the rule
>
> form, form * { display: inline; }
Well, yes, that would take care of the issue in a sense, but I would rather
use more specific selectors like
form, form div, form p { display: inline; }
Strange things _might_ happen in future browsers, when the default display:
inline-block (for img, input, select etc., as per CSS specs) is changed to
display: inline. I don't know what might happen, but specifically for that
reason, I would avoid creating the question.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
[Back to original message]
|