Fitting a character on a small button

Discussion in 'ASP .Net Building Controls' started by Nathan Sokalski, Mar 12, 2006.

  1. I have been trying to make a (supposedly) simple control. The control is
    nothing more than a control used to select integers, I was planning on
    making it a UserControl composed of a TextBox and 2 Buttons (basically like
    those controls you sometimes see in Windows applications). The functionality
    is obviously very simple code, and I was going to make the
    increment/decrement buttons using the characters 5 and 6 in the font
    Webdings. The problem occurs when I try to fit a character on a button that
    is only half the height of a TextBox (about 10px). I feel like I tried every
    combination of CSS properties possible, but it only seemed to want to let me
    move the character up, not down. Does anyone have any ideas as to how I can
    make a nice-looking good-sized button for this without using graphics? If
    so, I would greatly appreciate it if you could help me out here. Thanks.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
     
    Nathan Sokalski, Mar 12, 2006
    #1
    1. Advertising

  2. Nathan Sokalski

    Terry Burns Guest

    I'm unclear what your problem is really.

    It sounds like you are using an Image button control, but you are also
    talking about centering text which does not compute with me. Can you be
    explicit about the button type you are using the graphic size you have, and
    where the fonts fit into the equation and your stylesheet code. And the
    'Exact' problem you are having.

    Thanks.

    --
    Terry Burns
    http://TrainingOn.net
    "Nathan Sokalski" <> wrote in message
    news:...
    >I have been trying to make a (supposedly) simple control. The control is
    >nothing more than a control used to select integers, I was planning on
    >making it a UserControl composed of a TextBox and 2 Buttons (basically like
    >those controls you sometimes see in Windows applications). The
    >functionality is obviously very simple code, and I was going to make the
    >increment/decrement buttons using the characters 5 and 6 in the font
    >Webdings. The problem occurs when I try to fit a character on a button that
    >is only half the height of a TextBox (about 10px). I feel like I tried
    >every combination of CSS properties possible, but it only seemed to want to
    >let me move the character up, not down. Does anyone have any ideas as to
    >how I can make a nice-looking good-sized button for this without using
    >graphics? If so, I would greatly appreciate it if you could help me out
    >here. Thanks.
    > --
    > Nathan Sokalski
    >
    > http://www.nathansokalski.com/
    >
     
    Terry Burns, Mar 12, 2006
    #2
    1. Advertising

  3. I am not using an ImageButton, I am using a
    System.Web.UI.WebControls.Button, which means that there is no graphic
    involved. The most significant parts of my CSS code were the margin,
    font-size, and font-family properties. My "exact" problem, as best I can
    explain it, is the position of the text on the button. Because the button is
    so small (I believe the size I was using was 20x10px), I am having trouble
    centering the text. Because part of a character is sometimes transparent, I
    am having trouble moving the character vertically down far enough. Even
    though the visible part of the character is small enough, the physical size
    of the character is too big.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "Terry Burns" <> wrote in message
    news:%...
    > I'm unclear what your problem is really.
    >
    > It sounds like you are using an Image button control, but you are also
    > talking about centering text which does not compute with me. Can you be
    > explicit about the button type you are using the graphic size you have,
    > and where the fonts fit into the equation and your stylesheet code. And
    > the 'Exact' problem you are having.
    >
    > Thanks.
    >
    > --
    > Terry Burns
    > http://TrainingOn.net
    > "Nathan Sokalski" <> wrote in message
    > news:...
    >>I have been trying to make a (supposedly) simple control. The control is
    >>nothing more than a control used to select integers, I was planning on
    >>making it a UserControl composed of a TextBox and 2 Buttons (basically
    >>like those controls you sometimes see in Windows applications). The
    >>functionality is obviously very simple code, and I was going to make the
    >>increment/decrement buttons using the characters 5 and 6 in the font
    >>Webdings. The problem occurs when I try to fit a character on a button
    >>that is only half the height of a TextBox (about 10px). I feel like I
    >>tried every combination of CSS properties possible, but it only seemed to
    >>want to let me move the character up, not down. Does anyone have any ideas
    >>as to how I can make a nice-looking good-sized button for this without
    >>using graphics? If so, I would greatly appreciate it if you could help me
    >>out here. Thanks.
    >> --
    >> Nathan Sokalski
    >>
    >> http://www.nathansokalski.com/
    >>

    >
    >
     
    Nathan Sokalski, Mar 12, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?R2VvZmYgQyBNZWxib3VybmU=?=

    Fitting lots of fields on one web page

    =?Utf-8?B?R2VvZmYgQyBNZWxib3VybmU=?=, May 27, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    537
    John Timney \(ASP.NET MVP\)
    May 30, 2005
  2. Nathan Sokalski

    Fitting a character on a small button

    Nathan Sokalski, Mar 12, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    396
    Nathan Sokalski
    Mar 12, 2006
  3. Gali
    Replies:
    5
    Views:
    12,144
  4. manios76
    Replies:
    5
    Views:
    16,114
  5. Replies:
    1
    Views:
    583
    Toby Inkster
    Oct 23, 2005
Loading...

Share This Page