Jump to content
  • 0

Выравнивание кнопок по вертикали (chrome/webkit,firefox)


cdrom
 Share

Question

Требуется сделать две большие кнопки одинакового размера. Оказалось, что при многострочном содержимом плывет выравнивание по высоте.

Как выровнять кнопки по одной линии с разным содержимым?

Такое поведение наблюдается в firefox, crome и всех браузерах на основе webkit.

Смещение по вертикали 21px.

Ниже код и скрины с хрома.

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
button {
font: 700 60px "arial", "arial narrow";
width: 33%;
font-variant:small-caps;
height: 125px;
overflow: hidden;
margin: 5px 10px;
}

span.cfnDesc{
display:block;
font-size: 0.3em;
}
</style>

</head>
<body>
<div class="cfnSubstrate">
<button id="cfnBtnNo">Нет</button>
<button id="cfnBtnOk">Да<span class="cfnDesc">Описание</span></button>
</div>
</body>
</html>

71495fb53412t.jpg

5f282446bcc1t.jpg

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy