修改此html表以仅显示左侧和右侧

时间:2019-03-23 10:20:16

标签: html

我有一张1px的桌子。我需要这样的东西。但是我只需要左侧和右侧具有1px宽的灰色边缘即可。因此,它不必是此代码。我想这可能会更容易些,因为某种3列表的左侧和右侧为1px宽,带有灰色背景。尽管听起来很简单,但是我不确定如何做到这一点。但是我只需要在左右两侧显示1px边框即可。不是全部。

 <table border="0" cellpadding="0" cellspacing="0" align="center" 

   <table border="0" cellpadding="0" cellspacing="0" align="center" width="98%">
      <tr valign="top"> 
        <td colspan="3"> 
          <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr> 
              <td bgcolor="#C8C8C8"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
              <td bgcolor="#C8C8C8"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
              <td bgcolor="#C8C8C8"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
            </tr>
            <tr> 
              <td bgcolor="#C8C8C8"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
              <td width="100%" background="images/fon01.jpg" style="background-position: center; background-repeat: repeat-y;"> 
                <table border="0" cellpadding="1" cellspacing="0" width="100%" background="">
                  <tr valign="top"> 
                    <td valign="top"> 
                      <h2 class='post-title entry-title' itemprop='name headline' align="center"> 
                        <br>
                      </h2>
                      </td>
                  </tr>
                </table>
              </td>
              <td bgcolor="#C8C8C8"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
            </tr>
            <tr> 
              <td bgcolor="#C8C8C8"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
              <td bgcolor="#C8C8C8"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
              <td bgcolor="#C8C8C8"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>

0 个答案:

没有答案