Previous Message
Next Message

Re: [css-d] Absolute DIV causes text to overflow

Sent by Andrew Clover on 25 January 2002 12:12


Jordan Fritts [EMAIL-REMOVED]> wrote:

> What I can't seem to figure out is why the Mac IE 5.1 and NS 6 (PC - Mac?)
> cause the text in my absolutly positioned div to overflow outside of the
> borders.

Because you have set their 'height' too small to contain the text.

> I was using "overflow: visible" and that didn't work as described

'overflow: visible;' is the default value, so setting it explicitly won't
change anything here. It's working how it's supposed to: 'overflow' only
refers to the content inside the div, it doesn't make the div any larger
to fit content, so the background stays the height you specified.

If you want the div to grow to accommodate the content, simply don't
specify a 'height', or set it to the default value 'auto'.

BTW, you probably also want to use 'px' or 'em'/'%' to size the text rather
than the useless-for-screen-purposes 'pt'.

-- 
Andrew Clover
[EMAIL-REMOVED]
http://and.doxdesk.com/
Previous Message
Next Message

Message thread: