views:

624

answers:

3

related snippet as follows:

<textarea class="w100"></textarea>

.w100 {
    width:100%;
}

It works in firefox but not in IE6, why and how to fix this bug?

EDIT:AFTER ADDING A DIV,IT WORKS NOW.

<fieldset>
             <div>
              <textarea class="w100"></textarea>
             </div>
            </fieldset>
A: 

Did you try removing IE6 ?

Seriously have you checked all your margins and paddings ?

Ar3s
A: 

IE6 does not handle %sizes very well in some cases (and this is obviously one of them). If you put th textarea inside a div tag that has width set to 300px, you might see that it is fit to 100% of the div tag, but it doesn't work (I think) if the width of the div tag is 100%.

awe
A: 

Be sure to make the body and html to be 100% as well. I makes no sense (the body sould always be 100% of its own width, right?) but it seams to do the trick:

.html
{
  width:100%;
}
.body
{
 width:100%;
}
Charlie boy
since the problem is that the textarea does not fill its container (as I understood, it goes for any container) the issue doesn't remain in the html and body styles. (well I guess anyway)
Ar3s