开发者

IE7 and IE8 do not display bigger contents in dropdown box

开发者 https://www.devze.com 2023-02-13 18:26 出处:网络
My JSP/JSTL page has a dropdown box, and the size of the dropdown box is 20. Some contents inside the dropdown box are bigger than dropdown box size (20).

My JSP/JSTL page has a dropdown box, and the size of the dropdown box is 20. Some contents inside the dropdown box are bigger than dropdown box size (20). Firefox displays all bigger content开发者_如何学运维s in dropdown box automatically and IE 7 and IE 8 are not. So, In IE 7 and IE 8, I can see the contents till the 20th place (same to drop down box size).

Is this a problem with IE 7 and IE 8?

Could anyone please suggest some solution so that the dropdown box contents display like Firefox?


The answer is in the question. You have specified that the dropdown can only be 20 wide. Also the behavioural differences between FF and IE could be due to lack of DTD in your jsp page

use the css attribute min-width instead of "size 20" The browser will then always make your dropdown that width, unless you have wider content in the dropdown.

0

精彩评论

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