guybrush Posted April 4, 2007 Share Posted April 4, 2007 Greetings everyone! I post here 'cause i think the solution is more "css" than "html" I've a <select> with some <option> Many <option> have long description. Example: <selece name=sel> <option value=10>long description here long description here long description here long description here </option> <option value=13>long description here long description here long description here long description here </option> </select> I NEED to show each description, but too long to see in the <option> (too big for page). Actually I cut the description with PHP at 80 chars. Is there a way to show, e.g., as "ALT" for image ? Or any other tricks? Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/45539-css-problem-with-long-in/ Share on other sites More sharing options...
Daniel0 Posted April 4, 2007 Share Posted April 4, 2007 You could do something like this: <style type="text/css"> select[name="sel"] { width: 300px; } </style> <select name="sel"> <option value="10">long description here long description here long description here long description here </option> <option value="13">long description here long description here long description here long description here </option> </select> Quote Link to comment https://forums.phpfreaks.com/topic/45539-css-problem-with-long-in/#findComment-221102 Share on other sites More sharing options...
guybrush Posted April 4, 2007 Author Share Posted April 4, 2007 I think you didn't got the target The problem is not the size the problem is that I Have to let visible all the description. But if it's too long i need to cut it but, on option mouseover, let see the entire description (as a "title" or "alt") Hope my english is enaugh understandable to explane Quote Link to comment https://forums.phpfreaks.com/topic/45539-css-problem-with-long-in/#findComment-221108 Share on other sites More sharing options...
Daniel0 Posted April 4, 2007 Share Posted April 4, 2007 Ah, then you can just put the truncated part within the tag and the full part in the title attribute. E.g. <option value="13" title="long description here long description here long description here long description here">long description here long descripti...</option> Quote Link to comment https://forums.phpfreaks.com/topic/45539-css-problem-with-long-in/#findComment-221113 Share on other sites More sharing options...
guybrush Posted April 4, 2007 Author Share Posted April 4, 2007 I already tried it It run with FF but not with IE6 <html><body> <select name="se"> <option value="">----</option> <option value="15" title="FULL TEXT">bla bla bla</option> <option value="25" title="FULL TEXT">bla bla bla</option> <option value="35" title="FULL TEXT">bla bla bla</option> <option value="45" title="FULL TEXT">bla bla bla</option> </select> </body></html> Quote Link to comment https://forums.phpfreaks.com/topic/45539-css-problem-with-long-in/#findComment-221120 Share on other sites More sharing options...
guybrush Posted April 5, 2007 Author Share Posted April 5, 2007 Maybe need Js for it? Quote Link to comment https://forums.phpfreaks.com/topic/45539-css-problem-with-long-in/#findComment-222152 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.