内容更改时如何更改行高?

时间:2022-11-21 21:16:20

I have a HTML table that has 4 rows the height of rows are 10% 35% 45% 10% when I put content in row that have 45% of table height size if the amount of content height be large it decrease other rows height to show the content and all things go wrong what should I do? Is it possible to increase only the height of that row? Its not important if the page size increases.

我有一个HTML表,有4行,行的高度是10%35%45%10%当我把内容放在行中有45%的表高度大小如果内容高度的数量大,它减少其他行高度为显示内容,所有事情都出错我该怎么办?是否有可能只增加该行的高度?如果页面大小增加,这并不重要。

<html>
<head runat="server">
    <title> Kut Sharing</title>
     </head>
<body >
<div>
    <form id="form1" runat="server">
<table width="100%"   style="height:100%" border="0">
  <tr style="height:10%;background-image:url(Photos/header.png)"" >
     <td>
    <table width="100%" style=" height:100%" border="0">
  <tr>
    <td  style="width:12%; background-image:url(Photos/header2.gif)">&nbsp;</td>
    <td>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder></td>
  </tr>
</table>
</td>
  </tr>
  <tr style="height:35%; background-image:url(Photos/bluebox.png)"">
     <td>
      <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
    </asp:ContentPlaceHolder>
      </td>
  </tr>

  <tr style="height:45%;">
    <td>
         <asp:ContentPlaceHolder  id="ContentPlaceHolder2" runat="server">

    </asp:ContentPlaceHolder>
        <br />
        <br />

    </td>

  </tr>
  <tr style="height:10%; background-image:url(Photos/footerBg.png)"">
    <td>&nbsp;</td>
  </tr>
</table>
    </form>
    </div>
</body>
</html>

1 个解决方案

#1


1  

Don't use percentage for your heights in this case.

在这种情况下,不要将百分比用于您的高度。

#1


1  

Don't use percentage for your heights in this case.

在这种情况下,不要将百分比用于您的高度。