开发者

option tag title should be always display

开发者 https://www.devze.com 2022-12-13 08:04 出处:网络
is there anyway for the title in opt开发者_运维技巧ion tag to be displayed always? <select>

is there anyway for the title in opt开发者_运维技巧ion tag to be displayed always?

<select>
<option title="sometitle" value="">1</option>
</select>

any ideas please?

Thanks


Should be:

<select title="sometitle">
    <option value="">1</option>
</select>

I you want tool-tips on every option, you should consider developing a custom combo box that will implement that behavior (Using JQuery,HTML, CSS).


I am restricting the size of select, so I want the user be able to see long text that has been truncated in the title tag, as it gets disoplayed when the user hovers the mouse on the option

Just give it a width with help of a little CSS. In real webbrowsers the dropdown list width will automatically expand to the largest option when you open it. Only in a certain webbrowser developed by a team in Redmond the dropdown list width won't expand like that. It will hide large options which is indeed very hairpulling.

In that browser, you can use Javascript to control the width during the desired events. You can find a jQuery based example in this answer: Dropdownlist width in IE


I worked using the title tag, but I was using this previously and this does not answer my question.

0

精彩评论

暂无评论...
验证码 换一张
取 消