Multiline button text (was: CSS Question)

> We have a group of buttons on a page.  We want all the buttons to be the
> same size visibly.  However, we want some of the labels for those buttons to
> be split on multiple lines.  

You are almost certainly making unsafe assumptions about font sizes.
However, probably the only well defined way of doing this is to use button
elements.  Unfortunately they are not supported in NS4 and the support
is broken in IE4; I'm not sure about IE5.  Also, there is no obvious
way of allowing graceful degradation.  I'd therefore suggest that
what you are trying to achieve is not possible in internet HTML, although
it may be possible in a closed, single browser, environment.

> The usual way to fix this problem without using CSS is to hardcode a line

This is explicitly browser dependent, as buttons are normally handed over
to the operating system GUI for formatting.

> feed and return.  However, for at least one screen reader we are using
> internally, this causes problems.  The screen reader picks up the extra

I don't know how screen readers handle button elements.  Lynx does handle
them properly - my first encounter with them was in an IE4 only context,
but when I was using Lynx for some of the prototyping.  The worked properly
in Lynx, but not when I ran them on the target browser!

> characters and says "Test&13&10Button."  That is confusing to listen to.

I hope this was coded as "Test
Button".

Received on Tuesday, 8 May 2001 17:33:15 UTC