【问题标题】:Centering GWT Button inside div在 div 中居中 GWT 按钮
【发布时间】:2014-09-14 18:49:10
【问题描述】:

请帮助我在 div 中居中 GWT 按钮

代码

<div class='{style.container}'>
    <g:Button addStyleNames='{style.styleAlign}'>Click</g:Button>
</div>

CSS

.container {
            display: block;
            width: 100%;
            vertical-align: middle;
            margin: 0 auto;
        }
.styleAlign {
            font-size: 17px;
            margin-top: 10px;
            margin-bottom: 10px;
            height: 60px;
            width: 500px;
        }

谢谢。

【问题讨论】:

    标签: button gwt alignment


    【解决方案1】:

    添加这个:

    .container { 
        text-align: center; 
    }
    

    【讨论】:

      猜你喜欢
      • 2016-03-10
      • 1970-01-01
      • 2011-11-25
      • 1970-01-01
      • 2023-01-27
      • 2014-09-26
      • 2017-06-12
      • 2016-02-11
      相关资源
      最近更新 更多