intertwingly

It’s just data

Fun with CSS - Not


It is a small thing, but I always wanted my comment form to grow and shrink to match the window it is in. This would seem like a fairly easy thing to do, and in fact the code below is very simple, but behind it is a story:

 input[name="name"], input[name="email"], input[name="url"],
 textarea[name="comment"] {
   width: 100%
 }

What this code does is take the three input text fields, and the one textarea and makes them take up 100% of the width of the block in which they are embedded. Seems simple enough.

What took time was trying to find something that would work in IE.  And failing that, finding something that wouldn't look like crap in IE.

Update: any Microsoft readers of this weblog with access to the IE dev team? I've captured a snapshot of this blog entry with the style added directly to the input and textareas.  Go down to the comment textarea.  Type in any character.  The textarea bizarrely expands. That's what I am trying to avoid.