Chris Morris / 2003-09-24 14:19:
Mikko Rantalainen <mi**@st.jyu.fi> writes:
Chris Morris wrote:
Hmm. The <input> is a replaced inline element, which is presumably
May I ask why do you think that input is a replaced inline element? It
http://www.w3.org/TR/CSS2/conform.html#replaced-element is suggestive.
Though not binding, as far as I can tell.
Yes, the wording is suggestive even though the section is supposed
to be formal.
Actually, replaced or non-replaced it doesn't matter, since text-align
is only supposed to apply to block level elements anyway, applying it
to the _contents_ of any inline element seems unusual.
If you check the example I gave, you'll notice that I've "display:
block" which makes it [replaced?] block level element. The display
property has the effect I expect from any non-replaced element so I
guess it's working. Also, one can successfully apply pretty much all
CSS properties to <input type="text"> and <textarea> elements so I
guess those aren't replaced elements.
it would make more sense to have all form elements as replaced or all
elements as styleable.
Perhaps there is an inconsistency in Mozilla, if so I think the most
consistent with the spec is to not allow text-align to affect anything
_inside_ any form control.
Yes, that's definately an inconsistency in Mozilla but I'm still
wondering if there's some hack I can use? My point is that Mozilla
applies 'text-align' property to <input type="text"> and <textarea>
(the content of those) so *it can style form elements*. I guess the
rendering engine can align the button label as required if I can
poke it with suitable CSS declarations. Probably some property
starting with "-moz-". MSIE "correctly" styles input buttons without
any problems.
--
Mikko