मैं इस एचटीएमएलकस्टम बटन में केंद्र टेक्स्ट कैसे संरेखित करें?
<head>
<title>HTML5 App</title>
<link rel="stylesheet" type="text/css" href="css/custom.css">
<link rel="stylesheet" type="text/css" href="css/buttons.css">
</head>
<body>
<!--Estructura -->
<div id="botones">
<button class="btn" data-am-type="button">Soy un <button></button>
<a class="btn" data-am-type="button">Soy un <a></a>
<div class="btn" data-am-type="button">Soy un <div></div>
<input class="btn" type="button" value="Soy un <input>">
</div>
</body>
< बटन> और < इनपुट> है, पाठ बटन के मध्य में संरेखित करें है, लेकिन < एक> और < div> में, पाठ बटन के शीर्ष दिखाया गया है। मुझे लगता है कि < बटन> और < इनपुट> कुछ संपत्ति का उत्तराधिकारी है और इसलिए वे बटन के बीच में टेक्स्ट संरेखित करते हैं।
मैं इस
देख सकते हैं और मुझे लगता है कि सभी बटन बीच में पाठ संरेखित करना चाहते हैं।
वर्ग "btn" इस
.btn{
display: inline-block;
padding: 4px 12px; /* Padding por defecto */
font-size: 16px; /* Tamaño fuente por defecto */
line-height: 20px; /* Tamaño de linea */
text-align: center;
vertical-align: middle;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
cursor: pointer;
height: 80px;
background-color: #f5f5f5; /* por si no se ve el gradiente, aunque si lo pruebo en Chrome nunca deberia verse este color*/
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
border: 1px solid #cccccc;
-webkit-border-radius: 4px;
}
किसी भी विचार है?
[बटन के टेक्स्ट लंबवत संरेखण] के संभावित डुप्लिकेट (http://stackoverflow.com/questions/15487408/buttons-text-vertical-align) – Pensierinmusica