Size of IE input button

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Per Steffensen

    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
  • Evertjan.

    #2
    Re: Size of IE input button

    Per Steffensen wrote on 19 nov 2004 in
    comp.infosystem s.www.authoring.stylesheets:
    [color=blue]
    > 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...
    >[/color]

    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)

    Comment

    • Alan J. Flavell

      #3
      Re: Size of IE input button

      On Fri, 19 Nov 2004, Evertjan. wrote:
      [color=blue]
      > Play with the values:
      >
      > <input type="button" value="Short" style="padding: 0 85px;"><br>[/color]

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

      Comment

      • Neal

        #4
        Re: Size of IE input button

        On Fri, 19 Nov 2004 19:26:34 +0000, Alan J. Flavell <flavell@ph.gla .ac.uk>
        wrote:
        [color=blue]
        > On Fri, 19 Nov 2004, Evertjan. wrote:
        >[color=green]
        >> Play with the values:
        >>
        >> <input type="button" value="Short" style="padding: 0 85px;"><br>[/color]
        >
        > What have you got against sizing containers for text in em units?[/color]

        Gee, Alan, that would make too much sense! ;)

        Comment

        • Evertjan.

          #5
          Re: Size of IE input button

          Alan J. Flavell wrote on 19 nov 2004 in
          comp.infosystem s.www.authoring.stylesheets:
          [color=blue]
          > On Fri, 19 Nov 2004, Evertjan. wrote:
          >[color=green]
          >> Play with the values:
          >>
          >> <input type="button" value="Short" style="padding: 0 85px;"><br>[/color]
          >
          > What have you got against sizing containers for text in em units?[/color]

          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)

          Comment

          • Neal

            #6
            Re: Size of IE input button

            On 19 Nov 2004 20:25:25 GMT, Evertjan. <exjxw.hannivoo rt@interxnl.net >
            wrote:
            [color=blue]
            > Alan J. Flavell wrote on 19 nov 2004 in
            > comp.infosystem s.www.authoring.stylesheets:
            >[color=green]
            >> On Fri, 19 Nov 2004, Evertjan. wrote:
            >>[color=darkred]
            >>> Play with the values:
            >>>
            >>> <input type="button" value="Short" style="padding: 0 85px;"><br>[/color]
            >>
            >> What have you got against sizing containers for text in em units?[/color]
            >
            > Nothing, if you want to play that way, go ahead.
            >
            > But don't go presuming or ordering someone else to play your way.[/color]

            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.

            Comment

            • Evertjan.

              #7
              Re: Size of IE input button

              Neal wrote on 19 nov 2004 in comp.infosystem s.www.authoring.stylesheets:
              [color=blue]
              > 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.[/color]

              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:
              [color=blue][color=green]
              >> What have you got against sizing containers for text in em units?[/color][/color]

              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)

              Comment

              • Brian

                #8
                Re: Size of IE input button

                Evertjan. wrote:[color=blue]
                > Neal wrote:
                >
                >
                > the form you used:
                >
                >[color=green][color=darkred]
                >>> What have you got against sizing containers for text in em units?[/color][/color]
                >
                >
                > is like a preacher asking a pupil why he strayed from the good word.[/color]


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

                [color=blue]
                > I don't want to follow up on this, since it has nothing to do with
                > the primary Q of the OP.[/color]


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

                --
                Brian (remove "invalid" to email me)

                Comment

                • Evertjan.

                  #9
                  Re: Size of IE input button

                  Brian wrote on 20 nov 2004 in comp.infosystem s.www.authoring.stylesheets:[color=blue]
                  > Evertjan. wrote:[color=green]
                  >> Neal wrote:
                  >>
                  >> the form you used:
                  >>[color=darkred]
                  >>>> What have you got against sizing containers for text in em units?[/color]
                  >> is like a preacher asking a pupil why he strayed from the good word.[/color]
                  > This is usenet. Perhaps it's time for some thicker skin.[/color]

                  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.
                  [color=blue][color=green]
                  >> I don't want to follow up on this, since it has nothing to do with
                  >> the primary Q of the OP.[/color]
                  >
                  > I see. And if you deem a topic unworthy of discussion, then we ought to
                  > drop it?[/color]

                  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)

                  Comment

                  • Michael Fesser

                    #10
                    Re: Size of IE input button

                    .oO(Evertjan.)
                    [color=blue]
                    >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.[/color]

                    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

                    Comment

                    Working...