473,394 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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


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!

Nov 3 '05 #1
4 2314
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".
Nov 3 '05 #2
Els
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 -
Nov 3 '05 #3
Els <el*********@tiscali.nl> 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.

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

Nov 3 '05 #4
Els
Jukka K. Korpela wrote:
Els <el*********@tiscali.nl> 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 -
Nov 3 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Dom | last post by:
Hi, I wanted to use the Button Element to submit a form like this example: <form action="/test.exe" method="post"> <button id="ID_BUTTON_OK" name="_WEB_EVENT_HANDLER_" type="submit"...
3
by: JHR | last post by:
Hey all, I'm trying to make a sidebar box float to the right of various items, and for those items to wrap if a user shrinks his browser window. Instead, in every browser I've tried except for...
21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
29
by: Tom wilson | last post by:
I can't believe this is such an impossibility... I have an asp.net page. It accepts data through on form fields and includes a submit button. The page loads up and you fill out some stuff. ...
3
by: ckirchho | last post by:
Halo, I am trying to realize a two column layout basically like this: <html> <head> <style> leftCol { float: left; width: 15em; }
1
by: yb | last post by:
Please try the example below In Internet Explorer, when the mouse hovers between the right side of the image and the left side of the text, the cursor changes (i.e. Internet explorer is adding a...
1
by: suneel271 | last post by:
code working in internet explorer but not in mozilla and iam getting erroe like window.event has no properties and here is the code <%@ page language="java" contentType="text/html;...
9
by: mevryck | last post by:
Greetings I have a huge Javascript with inclusion of external scripts and all. I got this by doing a XSLT . Now I have the contents in a Javascript variable, but I'm not able to update the...
2
by: XolileWarren | last post by:
Can anyone help? I have a gridview and two link buttons;back and previous to navigate back and forward the page is working fine on Opera but the link button is not active when using FireFox and...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.