SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: Margins surrounding button text
-
Jan 3, 2005, 09:47 #1
- Join Date
- Jul 2004
- Location
- Williamstown, NJ
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Margins surrounding button text
Happy new year All:
I'm trying to create a css class that will eliminate the space before and after the text on an html button.
here is my css:
Code:<style type="text/css"> <!-- .smallButton { margin: 0px; padding: 0px; text-align: left; text-indent: 0px; width: auto; height: auto; } --> </style>
Code:<input name="Submit" type="submit" class="smallButton" value="Print Checks">
Any suggestions?
Thanks:
Rob
-
Jan 3, 2005, 11:26 #2
- Join Date
- Oct 2004
- Location
- Sendai, Japan
- Posts
- 2,417
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Code:button { height:1.5em; width:3em;}
HTML Code:<button>Hello</button>
-
Jan 3, 2005, 12:44 #3
- Join Date
- Jul 2004
- Location
- Williamstown, NJ
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks BonRouge:
That does change the width but not exactly in the way that i want. In mozilla my buttons look fine but in IE I get buttons with spacing before and after the text that appears somehow proportional to the length of the caption string. What i'm trying to do is to minimize the button size by eliminating that spacing.
Thanks.
-
Jan 3, 2005, 18:15 #4
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Hi,
I think the only way to do it in IE is with width as Bon Rouge suggested
Form controls are notoriously difficult to style and the properties allowed for styling vary between browsers also. (But if you find a way then let us know)
Paul
-
Jan 4, 2005, 07:50 #5
- Join Date
- Jul 2004
- Location
- Williamstown, NJ
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks guys:
It turns out that i did find a way. I simply abondoned the buttons all together and just used image fields. Of course this raises a new set of problems in the processing on the server side but such is life.
Rob
Bookmarks