Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Fitting a character on a small button

Reply
Thread Tools

Fitting a character on a small button

 
 
Nathan Sokalski
Guest
Posts: n/a
 
      03-12-2006
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/


 
Reply With Quote
 
 
 
 
Terry Burns
Guest
Posts: n/a
 
      03-12-2006
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/
>



 
Reply With Quote
 
 
 
 
Nathan Sokalski
Guest
Posts: n/a
 
      03-12-2006
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/
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fitting a character on a small button Nathan Sokalski ASP .Net 2 03-12-2006 08:57 PM
fitting Jframe size to the screen Gali Java 5 01-22-2006 09:01 PM
Fitting HTML on A4 or any other format. zeyais@gmail.com HTML 1 10-23-2005 10:35 AM
Fitting lots of fields on one web page =?Utf-8?B?R2VvZmYgQyBNZWxib3VybmU=?= ASP .Net 3 05-30-2005 03:54 PM
Fitting wide HTML table on A4 paper manios76 HTML 5 06-30-2004 02:44 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57