, , :
<div class="fakeinput">
<input type="text" size="2" class="mini_input" />
<div class="slash">/</div>
<input type="text" size="2" class="mini_input" />
</div>
CSS:
.fakeinput{display:block; border:1px solid #ccc; background:#f9f9f9; width:50px;}
.fakeinput *{display:inline-block; color:#555; vertical-align:middle}
.mini_input{width:15px; font-size:10px; border:none; background:none; box-shadow:none; padding: 3px 0 5px 5px}
, .
, UX, , , , , ,
btw, ,
Alternatively, if you want only one field, you can do this:
<input name="date" type="text" value="/" onblur="if (this.value=='') this.value = '/'" onfocus="if (this.value=='some text') this.value = ''" />
and then use the BuddhistBeast solution that looks really beautiful, so you cover all the bases with only one field
Devin source
share