Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


HTML select tag



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> HTML Forum
View previous topic :: View next topic  
Author Message
racco



Joined: 20 Nov 2005
Posts: 3

PostPosted: Sun Nov 20, 2005 1:04 am    Post subject: HTML select tag Reply with quote

Hello!

Do you know if there is any way to
cut very long <option> values short?

Maybe to present them in two lines or sth.

I have to do a form with <select> tag
and its <option> tags contain very long
phrases and it looks awfull.
There is no chance to cut them off to
the normal length, so I wonder whether
there is a way to let's say split the text
or sth.

Lookin forward to getting some support from you!!


racco
Back to top
View user's profile Send private message
webmaster
Site Admin


Joined: 17 Aug 2004
Posts: 3589
Location: Sweden

PostPosted: Sun Nov 20, 2005 12:28 pm    Post subject: Re: HTML select tag Reply with quote

Hi and welcome to DEVPPL.

Without using and server language like PHP or ASP, maybe you can do like this:

Code:
<select style="width:100px;">


I don't know if it can be done with javscript, but this is the way I would do it.
Back to top
View user's profile Send private message Visit poster's website
racco



Joined: 20 Nov 2005
Posts: 3

PostPosted: Sun Nov 20, 2005 4:03 pm    Post subject: Re: HTML select tag Reply with quote

hello!

thx for your answer!

your solution works under FireFox but it seems to be useless with IE, because it reduces the width of selector box, but you cannot see the whole content of any long <option> row (under FF you see all when you are Over it)


what to do?


racco
Back to top
View user's profile Send private message
webmaster
Site Admin


Joined: 17 Aug 2004
Posts: 3589
Location: Sweden

PostPosted: Mon Nov 21, 2005 12:24 am    Post subject: Re: HTML select tag Reply with quote

I don't know if there are any solutions for this in HTML and CSS. But do you have ASP or PHP installed on your server? If you have that, you can make some script that will cut of the sentence to like 70 characters and replace it bu three dots or something like that.

Do you know if you have PHP or ASP support on your server?
Back to top
View user's profile Send private message Visit poster's website
racco



Joined: 20 Nov 2005
Posts: 3

PostPosted: Mon Nov 21, 2005 9:57 pm    Post subject: Re: HTML select tag Reply with quote

I have PHP and it is not problem for me tu cut the length of a string, I rather wanted to know whether there is a way to present a very long option in select box reduced to some width (let's say on mouse over this option there would be sth similar to alt or title over image displayed)

but anyway, I managed to change the length by reducing and paraphrasing some words from those options, so now it is ok


thx
racco
Back to top
View user's profile Send private message
webmaster
Site Admin


Joined: 17 Aug 2004
Posts: 3589
Location: Sweden

PostPosted: Mon Nov 21, 2005 10:42 pm    Post subject: Re: HTML select tag Reply with quote

Ok, good that you could solve it. There might be some solution for it in JavaScirpt, so if you want to add thoose extra words again, check if there're some javascript solution for it.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> HTML Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap