[prev in list] [next in list] [prev in thread] [next in thread]
List: mozilla-layout
Subject: Re: scrollbars for <textarea style="width:100%; height:100%;">
From: idavey () my-dejanews ! com (Ian Davey)
Date: 2001-04-30 8:51:15
[Download RAW message or body]
In article <9ccsd0$pp73@secnews.netscape.com>, "Jesse Ruderman" <jruderman@hmc.edu> wrote:
>> >Cool, no scrollbars if I do
>> ><textarea style=" border:0; width:100%; height:100%; margin:
>> >0px"></textarea>.
>> >
>> >Is it a bug that I have to set extra styles to get a textarea without a
>> >scrollbar?
>>
>> Nope, because you're triggering quirks mode which is supposed to give a
>> "buggier" rendering that matches older browser behaviour. If you want to
>fix
>> it without the above style, just use an appropriate doctype, i.e.
>
>Hmm, that seems to kill the height:100% and make the textarea only be two
>lines tall.
That'll be because height="100%" isn't a valid HTML attribute. You can try
using:
<textarea style="height: 100%">
</textarea>
But the height is 100% of the containing block. So it'll only work if the
style is set on the containing block by css, i.e.
<div style="height: 200px">
<textarea style="height: 100%">
</textarea>
</div>
or
<table>
<tr><td style="height: 200px">
<textarea style="height: 100%">
</textarea>
</td></tr>
</table>
If you do:
<div style="height: 200px">
<p><textarea style="height: 100%">
</textarea></p>
</div>
Then it will shrink again as <p> is the containing block and doesn't have a
height set,
ian.
\ /
(@_@) http://www.eclipse.co.uk/sweetdespise/ (dark literature)
/(&)\ http://www.eclipse.co.uk/sweetdespise/libertycaptions/ (art)
| |
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic