How To Show All Text Of Very Long Select Option?
I have some very long
Solution 1:
what about this?
<select id="muchtextselect">
<option value="" title="This is some long text text This is some long text text This is some long text text ">This is some longtexttext This is some longtexttext This is some longtexttext </option>
<option value="">ShortText</option>
<option value="" title="This is some really, really long text">This is some really, really longtext</option>
</select>
js
var maxLength = 15;
$('#muchtextselect > option').text(function(i, c) {
if (c.length > maxLength) {
return c.substr(0, maxLength) + '...';
}
});
Solution 2:
USE style="width:xx%;"
Example
<select name="data" style="width:50%;">
<option value="1">Lorem Ipsum</option>
<option value="3">simply dummy</option>
<option value="3">textof the printing and typesetting industry. Lorem Ipsum has been the industry's</option>
</select>
Solution 3:
Please use Select2 last version with bootstrap :) i found it in 2 days
{!! Html::style('backend/dist/css/select2.min.css') !!}
{!! Html::style('backend/dist/css/select2-bootstrap.css') !!}
{!! Html::script('backend/dist/js/select2.min.js') !!}
Solution 4:
You can use max-width + text-emphasis css properties. For more information you can check here:
http://www.w3schools.com/cssref/pr_dim_max-width.asphttp://www.w3schools.com/cssref/css3_pr_text-emphasis.asp
Post a Comment for "How To Show All Text Of Very Long Select Option?"