IE7,IE8下Div内包含的Listbox显示不正常

html-css010

IE7,IE8下Div内包含的Listbox显示不正常,第1张

为了让listbox出现横向的滚动条,可直接在ListBox里引用cssClass=“scroll”

在样式表里加入

.scroll{

width:100px

display:block

overlow:auto

}

请试试。

还有,以后记得在所有的页面里的申明里务必加上

<meta

http-equiv="X-UA-Compatible"

content="IE=EmulateIE7"

/>

你看看那两个DIV 的宽度有没有问题 外边距有没有 加起来算算超总宽度没有 另外就是你 的那个道歉排行榜 让它左浮动试试。

我感觉你的那个利用BLOCK作的下拉菜单 在火狐里面应该可以有效果 你试试IE6行不 IE6 好像不支持 你试试 。

窗体上放一个PictureBox,两个CommandButton,一个FileListBox

Private Sub Command1_Click()

If File1.ListIndex = 0 Then

ShowPic File1.ListCount - 1

Else

ShowPic File1.ListIndex - 1

End If

End Sub

Private Sub Command2_Click()

If File1.ListIndex = File1.ListCount - 1 Then

ShowPic 0

Else

ShowPic File1.ListIndex + 1

End If

End Sub

Private Sub Form_Load()

File1.Visible = False

File1.Pattern = "*.jpg*.gif" '可以浏览的文件类型,使用分号隔开

File1.Path = App.Path '改成你需要浏览的目录,比如"C:\Pic"

If File1.ListCount >1 Then '目录中图片在两张以上可以浏览

ShowPic 0

Exit Sub

ElseIf File1.ListCount = 1 Then '目录中只有一张图片时只显示这一张

ShowPic 0

End If

Command1.Enabled = False

Command2.Enabled = False

End Sub

Private Sub ShowPic(Index As Long)

File1.ListIndex = Index

Picture1.Picture = LoadPicture(File1.Path &"\" &File1.List(Index))

End Sub