I think setting overflow will work too: overflow: hidden / auto / scroll.

Try to set the styles in your CSS though, rather than in your JS, separation
of concerns: CSS = style, JS = behavior, HTML = structure.

On Tue, May 17, 2011 at 6:20 PM, m4u <[email protected]> wrote:

> Hello,
>
> recently I have to resolve a brain-braker problem :
>
> var el = new Element('div');
> ...
> el.setStyles({
>    ....
>    'height': 5,
>    ....
> }
>
> and IE 9 set the height to 18 pixels instead of 5 pixels
>
> So to resolve the problem : set the font-size to 1, and so IE 9 will
> not change the height
>
> el.setStyles({
>    ...
>    'font-size':1,
>     'height': 5,
>    ....
> }
>
> hope this helps
>
> Philippe Lambotte

Reply via email to