この画像に表示されているようなフォームをレイアウトしようとしていますhttp://reversl.net/demo/ここで、ファーストネームと姓の入力はインラインですが、他のすべての入力はスタックされています。私は現在、次のマークアップを使用してこのようなものを持っています:http://reversl.net/form/;フォームのインライン入力とブロック入力
<div class="container">
<form>
<ol>
<li>
<label for=name>Firstname:</label>
<input id=name name=name type=text placeholder="Jon" required autofocus>
</li>
<li>
<label for=name>Surname:</label>
<input id=surname name=surname type=text placeholder="Doe" required autofocus>
</li>
<li>
<label for=message>Message:</label>
<textarea id=message name=message placeholder="Type your message here..." required></textarea>
</li>
</ol>
</form>
</div>
以下のようになります。
label {
display: block;
line-height: 1.75em;
}
input, textarea {
width: 250px;
display: inline-block;
margin-bottom: 2em;
padding: .75em .5em;
color: #999;
border: 1px solid #e9e9e9;
outline: none;
}
input:focus, textarea:focus {
-moz-box-shadow: inset 0 0 3px #aaa;
-webkit-box-shadow: inset 0 0 3px #aaa;
box-shadow: inset 0 0 3px #aaa;
}
textarea {
height: 100px;
}
作りますか? – Ktash
@ktash、ソートされました。選択したliを表示するように設定するだけです。インラインブロック – Jedda