CSS
- 5 ответов
- 0 вопросов
3
Вклад в тег
<div class="form">
<div class="form-col">
<span class="label">Email</span>
<span class="field">john</span>
</div>
...
<div class="form-col">
<div class="form-col-2">
<span class="label">Postcode</span>
<span class="field">2009</span>
</div>
<div class="form-col-2">
<span class="label">Country</span>
<span class="field">Australia</span>
</div>
</div>
</div>
<style>
.form{
max-width: 400px;
width: 100%;
}
.form-col .label{
float: left;
width: 80px;
}
.form-col .field{
display: block;
margin: 0 0 0 100px;
}
.form-col{
border-bottom: 1px solid #ccc;
overflow: hidden;
}
.form-col-2{
float: left;
width: 50%;
}
</style>