Re: Wrapping text inside a select menu
| From: | Matthew Leverton | Date: | Fri, 07 Jul 2000 21:04:41 +0000 |
| Subject: | Re: Wrapping text inside a select menu | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-5456@lists.php.net to get a copy of this message | ||
Select boxes cannot be wrapped with HTML. You may have to just abbreviate
the titles using substr(). You could possibly combine this with some
JavaScript that displays the full title in the status bar, or something
like that. You can also use style sheets to make the font smaller, but
this won't work with any browser that doesn't support it (NS4-, IE3-).
<select style="font-family: 'Verdana','Arial'; font-size: 8pt;">
</select>
--
Matthew Leverton - matthew@aeroinc.net -
http://www.allegro.cc
-----Original Message-----
From: Paulson, Joseph V. "Jay" <jay.paulson@viatel.com>
To: 'Matthew Leverton' <matthew@aeroinc.net>; php-general@lists.php.net
<php-general@lists.php.net>
Date: Friday, July 07, 2000 3:54 PM
Subject: [PHP] Wrapping text inside a select menu
>Thanks that worked wonderfully!
>
>However, I have another problem. I'm making another select menu, but this
>time you can only select one and not multiple, that prints out all the book
>id's and book titles. The problem I am having is that some of these book
>titles are rather long (100+ characters) and it is making my select box
>wider than my screen, so I am having to scroll left to right to view the
>whole title.
>
>My question:
>
>How do I "wrap" the title in the select box so it is not on one long line?
>
>I have it set in my <textarea> tag to wrap="hard" and wrap="physical"
>when
I
>enter the information. When I grab it back out to print out the new select
>menu I str_replace("\n", "<br>", $string). However, this doesn't
>"wrap"
the
>titles in the select menu. Any ideas how I could do this?
>
>Thanks,
>jay
>