View Full Version : Formatting input button text
Krashsite
07-27-2010, 08:00 PM
I'm trying to reduce the height of input buttons, but am unable to center the text vertically. Tried every css trick I know, but the text is still too low (I can make it lower :P). Any way to do this?
Old Pedant
07-27-2010, 08:24 PM
Did you try just changing the font-size??? Say to xx-small? Is that still not small enough?
Old Pedant
07-27-2010, 08:33 PM
Or how about this?
<html>
<head>
<style type="text/css">
a.pseudoButton {
height: 16px;
font-family: arial;
font-size: xx-small;
border: solid 1px black;
background-color: #eeeeee;
padding-left: 3px; padding-right: 3px;
text-decoration: none;
cursor: hand;
}
</style>
</head>
<body>
<form>
<a class="pseudoButton">Push Me</a>
</form>
</body>
</html>
Krashsite
07-28-2010, 03:30 AM
I reduced the default button height to 20px, and used a smaller font, but it's shifted down, not centered vertically. I can push it further down with padding, but can't reduce the top padding (top margin) within the button. It's centered horizontally without any help.
Krashsite
07-28-2010, 04:42 AM
Did you try just changing the font-size??? Say to xx-small? Is that still not small enough?
Dang, that was so simple, I missed it. :confused:
Yes, changing the font-size from default (10pt) to 8pt reduces the button height and text is centered both ways.
Thanks! :thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.