Scripsit Chris Seidel:
I have a submit-element with a background-image of 16x16 px and the
following style:
background-image: url("ok.gif");
background-repeat: no-repeat;
text-indent: 20 px;
Why? It sounds like you have no text in the button, just an image with text
"OK" in the background. Of course, you could and should have posted the URL
for clarification.
If that's the case, then you have done extra work to create a serious
accessibility problem. What happens when image display is disabled, or the
page is accessed using a screen reader or a Braille device?
The problem is, that text-indent is ignored.
That's correct by the specifications. Check the "Applies to" part.
When I supply the style
to a span, everything is fine.
Huh? No URL here either.
Is text-indent not supported for buttons/submits?
If you set display: block, then text-indent applies in principle. But what
is the textual contents that could have its first line indented? The input
element is empty by definition.
Do you wish to indent the text inside the button, or the button itself?
If not, how can I
achieve this indent for a button?
You're not telling what you want to indent and why you would do it that way
rather than margin or padding.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/