SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    PHP Otaku Gibb's Avatar
    Join Date
    Jul 2004
    Location
    Texas
    Posts
    454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    valigning text within a submit button?

    Howdy,

    I'm trying to get setup some CSS classes to get my submit buttons looking identical to my menu links. I've been able to get the borders, background colors, mouseovers, etc all working perfectly, but for some reason, the text in the submit buttons is not vertically centered. I've tried (valign="center") within the div class my button is in, but i suppose that just vertically centers the entire button.

    Here is my CSS class for .submit
    HTML Code:
    cursor: pointer;
        cursor: hand;
        text-decoration:none;
        font-size: 11px;
        font-family:  Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
        color:#000000;
        background:#8CA2D6;
        border-style:solid;
        border-color: #181C18;
        border-width:2px;
        width: 150px;
        height: 20px;
        padding-top: none;
        padding-bottom: none
    I realize there's alot of useless code in there, but i've been screwin around with this for hours now.

    Here is an image comparing my menu links (left) to the submit buttons (right).

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,868
    Mentioned
    159 Post(s)
    Tagged
    4 Thread(s)
    Try playing around with the line-height.
    Code:
    cursor: pointer;
    	cursor: hand;
    	text-decoration:none;
    	font-size: 11px;
    	font-family:  Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
    	color:#000000;
    	background:#8CA2D6;
    	border-style:solid;
    	border-color: #181C18;
    	border-width:2px;
    	width: 150px;
    	height: 20px;
    	line-height:14px;
       padding-top: none;
    	padding-bottom: none

    Paul

  3. #3
    PHP Otaku Gibb's Avatar
    Join Date
    Jul 2004
    Location
    Texas
    Posts
    454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that worked!

    /shakes your hand


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •