+ -
当前位置:首页 → 问答吧 → ie8下一行四列的图片第2行的3个图片跳到第3行去了

ie8下一行四列的图片第2行的3个图片跳到第3行去了

时间:2010-10-10

来源:互联网

我现在想让图文一行四列显示,一共显示2行,但是现在是第一行正常,第2行的前三个图文都跑到第3行去了,效果在IE8下截图如下,IE6下正常,FF也不正常。
111.jpg (116.83 KB)
2010-10-10 12:58

代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <style type="text/css"> <!-- .h5 { font-size:12px; font-weight:normal; height:12px; } /*早教视频列表样式*/ #shipintable { width:598px; height:320px; background-color:#ffffff; border:1px solid #ddd; clear:both; } #shipinlist { width:580px; margin-left:10px; padding-top:10px; clear:both; } #shipinlist li { width:25%; float:left; list-style-position:inside; list-style-type:none; } #shipinlist img { border:0px; } #shipinlist li a { color:#000; text-decoration:none; font-size:12px; font-weight:normal; } #contenttabletitle { width:598px; height:22px; border-bottom:1px solid #ddd; background:url(/images/indexlanmubg.jpg) no-repeat center; clear:both; } #contenttableleft { width:100px; height:22px; text-align:left; float:left; line-height:22px; text-indent:2em; color:#FF9900; font-weight:bold; } #contenttableleft a { color:#FF9900; font-weight:bold; text-decoration:none; } #contenttablecenter { width:400px; height:22px; float:left; margin-left:10px; line-height:22px; } #contenttablecenter a { color:#202020; font-weight:normal; text-decoration:none; } #contenttableright { width:80px; height:22px; text-align:center; line-height;22px; float:left; margin-left:5px; } #contenttableright a { color:#FF9900; font-weight:bold; text-decoration:none; } #contentbody { width:580px; padding:9px; clear:both; } --> </style> </head> <body> <div id="shipintable"> <div id="contenttabletitle"> <div id="contenttableleft"><a href="/video/">早教视频</a></div> <div id="contenttablecenter"><a href="/Video/zjflash/">早教flash</a>| <a href="/Video/bbzp/">宝宝自拍</a>| </div> <div id="contenttableright"><a href="/video/">更多视频</a></div> </div> <div id="contentbody"> <div id="shipinlist"> <li><a href="/7552.html" title="幽默叔叔教你这是什么"><img src="/UploadFiles/Video/2010/10/False.jpg"></a><h4><a href="/7552.html" title="幽默叔叔教你这是什么">幽默叔叔教你这是什么</a></h4></li><li><a href="/7458.html" title="你知道小刺猬的绝招吗"><img src="/UploadFiles/Video/2010/9/False17.jpg"></a><h4><a href="/7458.html" title="你知道小刺猬的绝招吗">你知道小刺猬的绝招吗</a></h4></li><li><a href="/7457.html" title="边吃冰淇淋边来学英语"><img src="/UploadFiles/Video/2010/9/False16.jpg"></a><h4><a href="/7457.html" title="边吃冰淇淋边来学英语">边吃冰淇淋边来学英语</a></h4></li><li><a href="/7440.html" title="在森林和园野上"><img src="/UploadFiles/Video/2010/9/False15.jpg"></a><h4><a href="/7440.html" title="在森林和园野上">在森林和园野上</a></h4></li><li><a href="/7439.html" title="要做互帮互助的好伙伴"><img src="/UploadFiles/Video/2010/9/False14.jpg"></a><h4><a href="/7439.html" title="要做互帮互助的好伙伴">要做互帮互助的好伙伴</a></h4></li><li><a href="/7438.html" title="消防队长让人哈哈大笑"><img src="/UploadFiles/Video/2010/9/False13.jpg"></a><h4><a href="/7438.html" title="消防队长让人哈哈大笑">消防队长让人哈哈大笑</a></h4></li><li><a href="/7437.html" title="我们来比比看谁高谁矮"><img src="/UploadFiles/Video/2010/9/False12.jpg"></a><h4><a href="/7437.html" title="我们来比比看谁高谁矮">我们来比比看谁高谁矮</a></h4></li><li><a href="/7436.html" title="老虎,狐狸,和一只鸡"><img src="/UploadFiles/Video/2010/9/False11.jpg"></a><h4><a href="/7436.html" title="老虎,狐狸,和一只鸡">老虎,狐狸,和一只鸡</a></h4></li> </div> </div> </div> </body> </html>
 提示:您可以先修改部分代码再运行

作者: batistutafans   发布时间: 2010-10-10

另外我想让这个h5的高度降低一些,好像设置了height不起作用。

作者: batistutafans   发布时间: 2010-10-10


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <style type="text/css"> <!-- h4{margin:0;padding:0;font-size:14px;text-align:center;line-height:35px;} ul,li{margin:0;padding:0;list-style-position:inside;list-style-type:none;} .h5 { font-size:12px; font-weight:normal; height:12px; } /*早教视频列表样式*/ #shipintable { width:598px; height:320px; background-color:#ffffff; border:1px solid #ddd; clear:both; } #shipinlist { width:580px; padding-top:10px; overflow:hidden;_zoom:1; } #shipinlist li { width:122px;margin:0 11px;_display:inline; float:left; } #shipinlist img { border:1px solid red;width:120px;height:100px;display:block; } #shipinlist li a { color:#000; text-decoration:none; font-size:12px; font-weight:normal; } #contenttabletitle { width:598px; height:22px; border-bottom:1px solid #ddd; background:url(/images/indexlanmubg.jpg) no-repeat center; clear:both; } #contenttableleft { width:100px; height:22px; text-align:left; float:left; line-height:22px; text-indent:2em; color:#FF9900; font-weight:bold; } #contenttableleft a { color:#FF9900; font-weight:bold; text-decoration:none; } #contenttablecenter { width:400px; height:22px; float:left; margin-left:10px; line-height:22px; } #contenttablecenter a { color:#202020; font-weight:normal; text-decoration:none; } #contenttableright { width:80px; height:22px; text-align:center; line-height;22px; float:left; margin-left:5px; } #contenttableright a { color:#FF9900; font-weight:bold; text-decoration:none; } #contentbody { width:580px; padding:9px; clear:both; } --> </style> </head> <body> <div id="shipintable"> <div id="contenttabletitle"> <div id="contenttableleft"><a href="/video/">早教视频</a></div> <div id="contenttablecenter"><a href="/Video/zjflash/">早教flash</a>| <a href="/Video/bbzp/">宝宝自拍</a>| </div> <div id="contenttableright"><a href="/video/">更多视频</a></div> </div> <div id="contentbody"> <ul id="shipinlist"> <li><a href="/7552.html" title="幽默叔叔教你这是什么"><img src="/UploadFiles/Video/2010/10/False.jpg"></a><h4><a href="/7552.html" title="幽默叔叔教你这是什么">幽默叔叔教你这是什么</a></h4></li><li><a href="/7458.html" title="你知道小刺猬的绝招吗"><img src="/UploadFiles/Video/2010/9/False17.jpg"></a><h4><a href="/7458.html" title="你知道小刺猬的绝招吗">你知道小刺猬的绝招吗</a></h4></li><li><a href="/7457.html" title="边吃冰淇淋边来学英语"><img src="/UploadFiles/Video/2010/9/False16.jpg"></a><h4><a href="/7457.html" title="边吃冰淇淋边来学英语">边吃冰淇淋边来学英语</a></h4></li><li><a href="/7440.html" title="在森林和园野上"><img src="/UploadFiles/Video/2010/9/False15.jpg"></a><h4><a href="/7440.html" title="在森林和园野上">在森林和园野上</a></h4></li><li><a href="/7439.html" title="要做互帮互助的好伙伴"><img src="/UploadFiles/Video/2010/9/False14.jpg"></a><h4><a href="/7439.html" title="要做互帮互助的好伙伴">要做互帮互助的好伙伴</a></h4></li><li><a href="/7438.html" title="消防队长让人哈哈大笑"><img src="/UploadFiles/Video/2010/9/False13.jpg"></a><h4><a href="/7438.html" title="消防队长让人哈哈大笑">消防队长让人哈哈大笑</a></h4></li><li><a href="/7437.html" title="我们来比比看谁高谁矮"><img src="/UploadFiles/Video/2010/9/False12.jpg"></a><h4><a href="/7437.html" title="我们来比比看谁高谁矮">我们来比比看谁高谁矮</a></h4></li><li><a href="/7436.html" title="老虎,狐狸,和一只鸡"><img src="/UploadFiles/Video/2010/9/False11.jpg"></a><h4><a href="/7436.html" title="老虎,狐狸,和一只鸡">老虎,狐狸,和一只鸡</a></h4></li> </ul> </div> </div> </body> </html>
 提示:您可以先修改部分代码再运行

作者: radom   发布时间: 2010-10-10

我记得我使用的方法 是给图片加个 vertical-align:middle   貌似就解决了

作者: millionfor   发布时间: 2010-10-10