Forum Moderators: not2easy

Message Too Old, No Replies

Text in DIV

         

Yoeri

12:58 pm on Aug 19, 2003 (gmt 0)

10+ Year Member



Hello,

I have the folliwong "problem":

I have a DIV width 20%, height 20px [edited] and a background color, with text in it.
When resizing the browser, the div gets smaller and the text breaks on another line.

In IE, the DIV also grows in height (along with the text), in Gecko based browsers, it doesn't ...

What can I do to get the IE behaviour in a standards way?

Thanks

Yoeri

[edited by: Yoeri at 1:15 pm (utc) on Aug. 19, 2003]

edit_g

1:00 pm on Aug 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried fixing the width of the div (200px or whatever, instead of 20%)?

Yoeri

1:15 pm on Aug 19, 2003 (gmt 0)

10+ Year Member



Found it ...

Just don't specify the height of the DIV.

the height was set to 20px which cause Mozilla to keep it 20px, even if there is breaking text in it. IE forgets the 20px and resizes it to the height of the breaking text ...

Yoeri

1:16 pm on Aug 19, 2003 (gmt 0)

10+ Year Member



Sorry edit_g, I forgot to mention that the DIV has a height of 20px ...