Fitting a character on a small button

N

Nathan Sokalski

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.
 
T

Terry Burns

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.
 
N

Nathan Sokalski

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top