English 中文(简体)
IE中一个纽芬兰文
原标题:Align text on a button in IE

我试图在IEC中使用 c子制造一个小 but子,但标题并非纵向集中......我如何这样做?

“垂直:中;”无效果:

......

.tinyButton
{
    -moz-box-shadow: inset 0px 1px 0px 0px #ffffff;
    -webkit-box-shadow: inset 0px 1px 0px 0px #ffffff;
    box-shadow: inset 0px 1px 0px 0px #ffffff;
    background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #d1d1d1) );
    background: -moz-linear-gradient( center top, #ffffff 5%, #d1d1d1 100% );
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr= #ffffff , endColorstr= #e5e5e5 );
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 2px;
    border-bottom-left-radius: 2px;
    border-bottom-right-radius: 2px;
    border-bottom-top-radius: 2px;
    border-bottom-top-radius: 2px;
    border: 1px solid #dcdcdc;
    color: #777777;
    font-family: verdana;
    font-size: 8px;
    padding: 1px 2px;
    height: 14px;
}

Thanks!! Mojo

最佳回答

你已经尝试:

vertical-align: middle;

edit: height of button needed to be adjusted to fit text properly

问题回答

例如:

line-height: 5px

并且,如果只为E7服务,你就可以这样做:

*line-height: 5px;
  1. Adjusted with padding
    padding: 3px 13px 5px;
  2. removed attribute height
  3. Added attribute
    float:left;

CSS

    .tinyButton {
        -moz-box-shadow: inset 0px 1px 0px 0px #ffffff;
        -webkit-box-shadow: inset 0px 1px 0px 0px #ffffff;
        box-shadow: inset 0px 1px 0px 0px #ffffff;
        background: -webkit-gradient( linear, left top, left bottom, 
        color-stop(0.05,#ffffff),  color-stop(1, #d1d1d1) );
        background: -moz-linear-gradient( center top, #ffffff 5%, #d1d1d1 100% );
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr= #ffffff ,
        endColorstr= #e5e5e5 );
        -moz-border-radius: 3px;
        -webkit-border-radius: 3px;
        border-radius: 2px;
        border-bottom-left-radius: 2px;
        border-bottom-right-radius: 2px;
        border-bottom-top-radius: 2px;
        border-bottom-top-radius: 2px;
        border: 1px solid #dcdcdc;
        color: #777777;
        font-family: verdana;
        font-size: 8px;
        padding: 3px 13px 5px;
        float:left;
    }




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签