You are here: Re: Possible to create multirow button in Firefox ? « HTML « IT news, forums, messages
Re: Possible to create multirow button in Firefox ?

Posted by Jukka K. Korpela on 11/16/07 17:29

Scripsit Julien:

> I found a ultra-easy way to write a multirow HTML button dynamically:

Actually, no. And it was bad style to quote a long fragment of discussion,
when it was irrelevant to your message. In future, please quote or
paraphrase _key_ sentence(s) only.

> the linefeed (LF) character must be used to set each new row. This
> works with Microsoft Internet Explorer, Firefox and probably other
> browsers :
> text$ = "<input id='btn_CreateProducts' type='submit' value='Create
> \nproduct' disabled />"

First, the method used to generate the HTML is irrelevant when considering
the HTML issue.

Second, it only "works" due to browser bugs. Stay tuned to getting fixed
when browsers improve.

> ...where \n here inserts a LineFeed character.
>
> Putting a carriage return instead of a linefeed only works with
> Microsoft Internet Explorer, not Firefox.

By HTML specs, CR, LF, and CR LF pair all all equivalent to each other and
to the space character. So what browsers do is not just odd, it's incorrect.

Years ago, when the question "how to divide button text on two line" was
asked more often, I wrote the page
http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html
that explains this issue, among others.

Apparently authors don't try such things any more. I think they learned the
lesson by experience rather than from my page, but anyway, the lesson is:
keep button text so short that it fits on one line without difficulties. Any
explanations should precede the button rather than being included into it.
The text "Create" is fine, if the context makes it clear what is being
created, as it should anyway. The text "Create product" is actually fine
too, and it does not cause spacing problems unless you create them.

Setting a width on the button, as discussed, might be harmless in most
cases. But do you really know how wide it should be? You don't know the
font, and you should not be possessed with the idea of "controlling" it.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация