如果固定图片尺寸
只固定table尺寸不行吗?

解决方案 »

  1.   

    如果不固定图片尺寸
    只固定table尺寸不行吗?
      

  2.   

    不可能,只能固定了图片大小才能保证TABLE
      

  3.   

    可以做到,看下面的例子
    <STYLE TYPE="text/css">
    table{TABLE-LAYOUT: fixed}
    TD{WORD-WRAP: break-word}
    </STYLE>这表格高 20 宽 50 ,图片http://expert.csdn.net/images/csdn.gif没显示完.<table width="50" height="20" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src=http://expert.csdn.net/images/csdn.gif></td>
      </tr>
    </table>
      

  4.   

    用getimagesize($filename)取得图片尺寸,再用等比例缩放,你会写吧?不知道getimagesize怎么用,那看看php-menual
      

  5.   

    用IMG标签里的width,height, 参数,控制图片的长和宽。
    <img src="a.jpg" width=80 height=100>
    这样就将显示的图片的大小限制在80*100了
      

  6.   

    <table  style="table-layout:fixed">
      

  7.   

    <img src="img.gif" border=0 onload="javascript:if(this.width>500)this.width=500">图片宽大于500时,设置宽度为500
      

  8.   

    <img src="" width="" height="" ....>
    给图片设定一下大小就可以了啊