Click here to get back home

button element in Internet Explorer has too much left/right space when its text is long

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
button element in Internet Explorer has too much left/right space when its text is long David 11-03-2005
Posted by David on November 3, 2005, 7:09 am
Please log in for more thread options



copy and paste the following in a new html file and see it in IE:


<form action="">

<button>Button1</button>

<br>

<button>ButtonButtonButton11</button>

</form>


you will find that the left and right space of the second button is too
much
(in my opinion). if you run it in Firefox, you will the space is the
same for both
buttons.

is this a IE bug? How to make it appear the same way as in Firefox?

thanks!


Posted by Jukka K. Korpela on November 3, 2005, 7:55 pm
Please log in for more thread options


David wrote:

> you will find that the left and right space of the second button is too
> much (in my opinion).

If you say so. But there's no particular reason why a browser should
follow your opinion rather than someone else's.

> is this a IE bug?

It is an IE bug that it uses black color for text by default?

Anyway, why would that matter? The _functionality_ of <button> in IE is
seriously broken, and even the _idea_ of <button> (to make buttons look
whatever each author thinks they should like) is questionable. Form
controls should follow the principle "form follows function".

Posted by Els on November 3, 2005, 7:15 pm
Please log in for more thread options


Jukka K. Korpela wrote:

> David wrote:
>
>> you will find that the left and right space of the second button is too
>> much (in my opinion).
>
> If you say so. But there's no particular reason why a browser should
> follow your opinion rather than someone else's.
>
>> is this a IE bug?
>
> It is an IE bug that it uses black color for text by default?
>
> Anyway, why would that matter? The _functionality_ of <button> in IE is
> seriously broken, and even the _idea_ of <button> (to make buttons look
> whatever each author thinks they should like) is questionable. Form
> controls should follow the principle "form follows function".

The same thing happens on input elements (the button type) too though.
The more text on it, the more extra space is used on the button.
IIRC setting a width helps, but that must be a width in ems though,
because when enlarging the text the button won't expand naturally like
when you leave the width alone, and the text will be cut off.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -

Posted by Jukka K. Korpela on November 3, 2005, 11:00 pm
Please log in for more thread options



> The same thing happens on input elements (the button type) too though.
> The more text on it, the more extra space is used on the button.
> IIRC setting a width helps, but that must be a width in ems though,
> because when enlarging the text the button won't expand naturally like
> when you leave the width alone, and the text will be cut off.

There's a much simpler solution: don't put much text into a button.
This is useful for clarity and for useability. A button should be simple and
look simple, and the text in it should be concise, typically one verb.
Any explanations that might be needed should be given in normal text before
the button.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


Posted by Els on November 4, 2005, 12:06 am
Please log in for more thread options


Jukka K. Korpela wrote:

>
>> The same thing happens on input elements (the button type) too though.
>> The more text on it, the more extra space is used on the button.
>> IIRC setting a width helps, but that must be a width in ems though,
>> because when enlarging the text the button won't expand naturally like
>> when you leave the width alone, and the text will be cut off.
>
> There's a much simpler solution: don't put much text into a button.
> This is useful for clarity and for useability. A button should be simple and
> look simple, and the text in it should be concise, typically one verb.
> Any explanations that might be needed should be given in normal text before
> the button.

Good point :-)

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -

Similar ThreadsPosted
Button Element and Internet Explorer 6.0 August 3, 2004, 8:24 am
Table width is broken when using back button in Internet Explorer July 28, 2005, 6:05 am
Have a very long select element repeated August 22, 2007, 12:59 am
Internet Explorer Bug? May 22, 2006, 6:05 pm
css & internet explorer January 10, 2008, 4:55 am
Box Model in Internet Explorer 7.0 May 16, 2005, 10:22 am
subscripts on Internet Explorer March 7, 2005, 9:25 am
“ and Internet Explorer (6) October 29, 2008, 9:28 am
internet explorer vs firefox vs netscape March 1, 2005, 7:13 pm
internet explorer makes gabs September 1, 2005, 1:39 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap