I have 3 divs that I would like to display as table cells:
-
The problem appears to be due to display: table-cell
on input
elements being experimental. See this question for more details: display:table-cell not working on an input element
The solution is to wrap the input in a span
and apply display: table-cell
to the span
and to remove overflow: auto
from the input
.
The new mark up looks like so:
test
The css now looks like this:
body {
font-size: 13px;
}
.field {
width:450px;
display: table;
}
.field > * {
display: table-cell;
border: 1px solid red;
}
span {
padding: 0 5px;
}
label {
width: 125px;
}
input {
width: 100%;
}
.subdomain-base {
width: 1px;
}
.subdomain-base {
color: blue;
font-size: 13px;
}
Jsfiddle: http://jsfiddle.net/ahLMH/6/