473,396 Members | 2,013 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,396 software developers and data experts.

Size of IE input button

Hi

I have the following in my html:

<input type="button" value="Short"/>
<input type="button" value="Very long text on this button"/>

It gives two buttons on the html form. My problem is that in IE the
length, from where the text on the botton starts/ends (horisontally)
to the border of the button, depends on the length of the text on the
button. That is, the difference in length between my two buttons is
not only the diffenrece in the lenght of the two texts ("Short" and
"Very long text on this button"), cause the margin between the text
and the borders of the button is also much larger for the button with
the long text.

I would like a fixed length from the left border of the button to
where the text starts, and from where the text ends to the right
borden of the button.

How do I do that? I have tried alot of different stylings etc. But
nothing helps...

Thanx alot...

Steff
Jul 21 '05 #1
9 15742
Per Steffensen wrote on 19 nov 2004 in
comp.infosystems.www.authoring.stylesheets:
I would like a fixed length from the left border of the button to
where the text starts, and from where the text ends to the right
borden of the button.

How do I do that? I have tried alot of different stylings etc. But
nothing helps...


Play with the values:

<input type="button" value="Short" style="padding:0 85px;"><br>
<input type="button" value="Very long text on this button"
style="padding:0 65px;">
<br>
<br>
<br>
<input type="button" value="Short" style="width:300px;"><br>
<input type="button" value="Very long text on this button"
style="width:300px;">
<br>
<br>
<br>
<input type="button" value="Short" style="width:50px;"><br>
<input type="button" value="Very long text on this button"
style="width:180px;">
<br>
<br>
<br>
<input type="button" value="Short"><br>
<input type="button" value="Very long text on this button">
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 21 '05 #2
On Fri, 19 Nov 2004, Evertjan. wrote:
Play with the values:

<input type="button" value="Short" style="padding:0 85px;"><br>


What have you got against sizing containers for text in em units?
Jul 21 '05 #3
On Fri, 19 Nov 2004 19:26:34 +0000, Alan J. Flavell <fl*****@ph.gla.ac.uk>
wrote:
On Fri, 19 Nov 2004, Evertjan. wrote:
Play with the values:

<input type="button" value="Short" style="padding:0 85px;"><br>


What have you got against sizing containers for text in em units?


Gee, Alan, that would make too much sense! ;)
Jul 21 '05 #4
Alan J. Flavell wrote on 19 nov 2004 in
comp.infosystems.www.authoring.stylesheets:
On Fri, 19 Nov 2004, Evertjan. wrote:
Play with the values:

<input type="button" value="Short" style="padding:0 85px;"><br>


What have you got against sizing containers for text in em units?


Nothing, if you want to play that way, go ahead.

But don't go presuming or ordering someone else to play your way.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 21 '05 #5
On 19 Nov 2004 20:25:25 GMT, Evertjan. <ex**************@interxnl.net>
wrote:
Alan J. Flavell wrote on 19 nov 2004 in
comp.infosystems.www.authoring.stylesheets:
On Fri, 19 Nov 2004, Evertjan. wrote:
Play with the values:

<input type="button" value="Short" style="padding:0 85px;"><br>


What have you got against sizing containers for text in em units?


Nothing, if you want to play that way, go ahead.

But don't go presuming or ordering someone else to play your way.


You miss the point entirely. em units are based on the prevailing font
size. Therefore, whatever size the user sets their font to, a button sized
in ems will fit.

If you size in pixels, you run the very real risk of the text overflowing
the button, making your interface unusable.

How you see this as bullying is beyond me. I think you need to give this a
second thought.
Jul 21 '05 #6
Neal wrote on 19 nov 2004 in comp.infosystems.www.authoring.stylesheets:
You miss the point entirely. em units are based on the prevailing font
size. Therefore, whatever size the user sets their font to, a button
sized in ems will fit.

If you size in pixels, you run the very real risk of the text
overflowing the button, making your interface unusable.

How you see this as bullying is beyond me. I think you need to give
this a second thought.


No, I don't miss the point at all. You are mising the point.

The point of the OP was houw to manipulate the size of the buttons, and I
show how to play with that.

I always use a fixed font-size on my sites, since I use lots of images
that don't want to be affected by the em system.

I know quite well what the prevailing idea in this NG is and I don't
agree, but you are welcome to add your ideas to my posting.

However the form you used:
What have you got against sizing containers for text in em units?


is like a preacher asking a pupil why he strayed from the good word.

I don't want to follow up on this, since it has nothing to do with the
primary Q of the OP.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 21 '05 #7
Evertjan. wrote:
Neal wrote:
the form you used:

What have you got against sizing containers for text in em units?


is like a preacher asking a pupil why he strayed from the good word.

This is usenet. Perhaps it's time for some thicker skin.

I don't want to follow up on this, since it has nothing to do with
the primary Q of the OP.

I see. And if you deem a topic unworthy of discussion, then we ought to
drop it?

--
Brian (remove "invalid" to email me)
Jul 21 '05 #8
Brian wrote on 20 nov 2004 in comp.infosystems.www.authoring.stylesheets:
Evertjan. wrote:
Neal wrote:

the form you used:
What have you got against sizing containers for text in em units?

is like a preacher asking a pupil why he strayed from the good word.

This is usenet. Perhaps it's time for some thicker skin.


This has nothing to do with skins, but with the preoccupation of this
specific NG with changing the topic of very interesting topics to the em
preoccupation.
I don't want to follow up on this, since it has nothing to do with
the primary Q of the OP.


I see. And if you deem a topic unworthy of discussion, then we ought to
drop it?


I did not say that. If I say, I don't want to follw up [again] on the em
subject, that does not mean I prevent you and you and you to drop it.
I didn't even say it was unworthy, I said wat I planned to do.

Please go on discussing the em question.
This is usenet Brian ;-}

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 21 '05 #9
.oO(Evertjan.)
I always use a fixed font-size on my sites, since I use lots of images
that don't want to be affected by the em system.


But you know that there's nothing like a "fixed" font-size?
All graphical browsers allow the user to resize fonts. If your layout
can't cope with that it's broken.

Micha
Jul 21 '05 #10

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

Similar topics

3
by: Moist | last post by:
Hi, I know this may be a trivial question but I wonder if it is possible to load a new HTML page (without opening a new window) by just clicking an input button. Is there a way to do this...
2
by: Stephen Noronha | last post by:
Hi all, I have an input button <input type="button" id="Button2" name="Button2" value="More" onclick="openPage()"> this input button onclick opens another page. this "More" button is for...
2
by: Stephen Noronha | last post by:
Hi all, I have an input button <input type="button" id="Button2" name="Button2" value="More" onclick="openPage()"> this input button onclick opens another page. this "More" button is for...
1
by: sonicsoul | last post by:
Hi, i wanted to define default global styles that would be used by 90% of controls. I would like to differentiate input text controls from input button controls. is there a way to specify this in...
3
by: vishnu | last post by:
Hi, I am using HTML input file button to browse the file and just am updating the file name in sql server table.But now i want to browse the file from the remote file share path ..How can i...
3
by: atma86 | last post by:
I'm trying to create a custom background image for an html input button. As easy as this sounds I can't get the image to render in internet explorer (i know i'm shocked as well). Below is my code:...
4
by: Chris | last post by:
Hi, i 'm experimenting with postback and i tried that with a button server control and an Html input button but with runat="server". The button server control causes a postback, but not the...
3
by: Valli | last post by:
Hi, I want to add an image to a html type input button. How can I do this? I have used background image style . But its not working. My target is to show an image in the button can anyone...
18
by: bning | last post by:
Hmm this forum really doesn't give you long enough to type in your question before logging you out.. well here goes my second attempt: I'm trying to teach myself javascript with dom scripting and...
10
by: bgold12 | last post by:
Hey, I know of two ways to place a link on an HTML page; (1) use the anchor element, and (2) use javascript to respond to an event (such as onclick) and set the location. I recently started...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.