2016-04-19 5 views
1

私のウェブサイトのボタンに問題があります。同じ幅ではありません。結果の幅を設定してみました。ボタンが同じ幅でないHTMLとCSS

CSS

.menuList{ 
    text-align: center; 
    margin-top: 2em; 
} 
.lItem{ 
    display: inline-block; 
    margin-left: 1em; 
    margin-right: 1em; 
    max-height: 1em; 
} 
.btn{ 
    text-decoration: none; 
    color: white; 
    margin: 0 auto; 
    padding: 1em 4em 1em 4em; 
    font-family: 'Raleway'; 
    border: 2px solid white; 
} 

HTML

<ul class="menuList"> 
    <li class="lItem"><a class="btn" href="#">Cooking</a></li> 
    <li class="lItem"><a class="btn" href="#">Technique</a></li> 
</ul> 
+0

赤のようなものに変更境界線の色をテスターに​​は、それをテストすることができるように。 – smraj

答えて

0

CSSの変更:

.menuList{ 
    text-align: center; 
    margin-top: 2em; 
} 
.lItem{ 
    display: inline-block; 
    margin-left: 1em; 
    margin-right: 1em; 
    line-height: 2.4em; 
    max-width:184px; 
    width:184px; 
    border: 2px solid white; 
} 
.btn{ 
    text-decoration: none; 
    color: white; 
    margin: 0 auto; 
    padding: 1em auto; 
    font-family: 'Raleway'; 
} 
関連する問題