Forum Moderators: not2easy

Message Too Old, No Replies

Overflow: visible not working with textarea

         

hodgejr

4:18 pm on Feb 26, 2007 (gmt 0)

10+ Year Member



Hi, I'm trying to resolve an issue where I cannot get the Overflow: visible to work with textareas.
We're working on several sites that have a user-defined description field, where the description appears in a textarea. A textarea was used so line breaks will be properly displayed.

Problem is, even when using Overflow: visible property, it will not overflow.
Here is the site, you can clearly see the issue in the description field:

<url removed>

I think it's set to "Scroll" right now - but when testing locally with Visible, it does not work.

I'm open to suggestions - I tried the same with a Div layer instead of textarea and it worked, but the Div layer solution ignores line breaks and spacing.

ps - Forgot to mention that it will work in Ie7 if I remove the Doctype from the page - but will that affect the site negatively, or make it not work in certain browsers?

[edited by: encyclo at 5:21 pm (utc) on Feb. 26, 2007]
[edit reason] no links to personal sites please, see forum charter [/edit]

SuzyUK

1:23 pm on Mar 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi hodgejr and Welcome to WebmasterWorld!

textarea sizes are defined by specific widths/heights or rows/columns they do not auto expand with their content by nature and they scroll by default.

You say you've tried a div but that the text formatting was then the problem.. have you tried wrapping the content of the div in <pre> </pre> tags would that work in your situation - you can then format the <pre> element like any others it doesn't have to be monospace font.. that solution depends on if it's just plain text you want to output though..

If the scroll box contains what should be different HTML elements, you somehow need to format the text which goes in/comes out of the database (am presuming this is the case) this would require a scripting solution (PHP or ASP) to mark up these plain text headings, paragraphs, links, line breaks etc with their appropriate HTML elements on output. If that is the case you might ask in the PHP or ASP forum whichever language you're using for more details as that is beyond the scope of CSS.

Suzy