473,785 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 15769
Per Steffensen wrote on 19 nov 2004 in
comp.infosystem s.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:30 0px;"><br>
<input type="button" value="Very long text on this button"
style="width:30 0px;">
<br>
<br>
<br>
<input type="button" value="Short" style="width:50 px;"><br>
<input type="button" value="Very long text on this button"
style="width:18 0px;">
<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.infosystem s.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.infosystem s.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.infosystem s.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.infosystem s.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
26814
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 right inside the "input" tag or I must call a JavaScript function? If this is the later case, how can I do this within that function?
2
1255
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 additional information only (say I have extra notes), and if there is none available then it should not appear.
2
1071
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 additional information only (say I have extra notes), and if there is none available then it should not appear.
1
3129
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 this sort of way: input text { font-family: verdana; } input button { font-family: arial; } also, if i do this, and than override specific controls with custom styles, would it be recommended practice?
3
2763
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 specify this path in HTML input button.Is there anyway to open the file from the specified path instead of opening local directory? Thanks,
3
6917
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: can anyone please help out??? Thanks in advance, Joe Estes <html> <head> <style type="text/css" rel="stylesheet"> #mysubmit { <br />
4
13308
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 Html input button with runat="server". Can someone explain me why (because it's running on the server)? Thanks
3
1744
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 help me? -- Regards
18
2626
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 am attempting to write an application as I learn. It's been going fine but I've ran into a problem which is driving me crazy. I'll start off by explaining what I'm trying to achieve... I'm simply trying to insert an input button into a table at a...
10
40642
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 using anchors more, and I eventually happened to try to put an anchor link around an input button, as you can see: <a href="example.com"><input type="button" value="Example" /></a> This worked fine in Firefox and Chrome, but it doesn't have any...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10329
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10152
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.