小さな問題があります。私はボタンの幅と高さを変更しようとしていますが、何らかの理由でそれができません。ボタンは自動的に含まれているテキストと同じ幅と高さのままです。あなたは、ディスプレイを使用するように.buttonを変更する必要がHTMLボタンは、ボタン内のテキストの幅と高さのみを使用します。
CSS
.flexcontainer {
display: flex;
align-items: center;
overflow: hidden;
}
img[width="500"] {
border: 3px solid #5F5F5F;
border-radius:3px;
float: left;
}
#leftRetail {
display: block;
height:354px;
width: 1308px;
float:right;
text-align: center;
vertical-align: middle;
line-height: 354px;
}
.button {
width: 250px;
height: 200px;
background: #ed2626;
border-radius: 2px;
color: white;
font-weight: bold;
text-decoration:none;
}
HTML
<div class="flexcontainer">
<div>
<img src="anyImage.jpg" width="500" height="350"/>
</div>
<div id="leftRetail">
<a href="Template.pdf" class= "button">Retail Menu</a>
</div>
</div>
[Aタグの幅と高さの設定]の複製が可能です。(http://stackoverflow.com/questions/4743254/setting-a-width-and-height-on-an-a-tag) – litel