Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (55 sloc) 1.06 KB
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS tables example</title>
html {
font-family: sans-serif;
form {
display: table;
margin: 0 auto;
form div {
display: table-row;
form label, form input {
display: table-cell;
margin-bottom: 10px;
form label {
width: 200px;
padding-right: 5%;
text-align: right;
form input {
width: 300px;
form p {
display: table-caption;
caption-side: bottom;
width: 300px;
color: #999;
font-style: italic;
<p>First of all, tell us your name and age.</p>
<label for="fname">First name:</label>
<input type="text" id="fname">
<label for="lname">Last name:</label>
<input type="text" id="lname">
<label for="age">Age:</label>
<input type="text" id="age">
You can’t perform that action at this time.