无法删除Wordpress站点上的表格边框

时间:2016-03-29 02:06:52

标签: html css wordpress

如果我将代码放在桌面上的空白HTML文件中,但不在网站上,则可行。我一直无法从Wordpress网站删除表格边框。这是我到目前为止的代码:

HTML

  <table border="0" cellspacing="0" cellpadding="0">
   <td>
      <a href="http://graysonforeman.com/portfolio/websites/">
      <img src="http://graysonforeman.com/wp-content/uploads/2016/03/mrs.jpg" height="175"     width="175"></a>
   <td><a href=" http://graysonforeman.com/portfolio/writing/">
      <img src="http://graysonforeman.com/wp-content/uploads/2016/03/pen_paper_2-512.png" height="175" width="175"></a>
   </td>
   <td><a href="http://graysonforeman.com/portfolio/programming/">
      <img src="http://graysonforeman.com/wp-content/uploads/2016/03/Java.png" height="175" width="175"></a>
   </td>
   </tr>
   <tr>
      <td>Websites</td>
      <td>Writing</td>
      <td>Programming</td>
</table>

我考虑过编辑样式表,但我不想弄乱其余的主题。谢谢你的帮助。

3 个答案:

答案 0 :(得分:1)

尝试将!important属性用于样式,如下所示:

<table style="border: 0 !important;" cellspacing="0" cellpadding="0">
  

!important规则是一种制作CSS级联的方法,但也有   你觉得最重要的规则总是适用。有规则   无论在哪里,都会应用!important属性   规则出现在CSS文档中。

请在此处查看更多详情:What does !important in CSS mean?

答案 1 :(得分:1)

尝试清除tabletd

上的边框
<style type='text/css'>
table.no_border, table.no_border td{
border:0 !important;
}
</style>
<table border="0" cellspacing="0" cellpadding="0" class='no_border'>
   <tr>
      <td>
         <a href="http://graysonforeman.com/portfolio/websites/">
            <img src="http://graysonforeman.com/wp-content/uploads/2016/03/mrs.jpg" height="175"     width="175">
         </a>
      </td>
      <td>
         <a href=" http://graysonforeman.com/portfolio/writing/">
            <img src="http://graysonforeman.com/wp-content/uploads/2016/03/pen_paper_2-512.png" height="175" width="175">
         </a>
      </td>
      <td>
         <a href="http://graysonforeman.com/portfolio/programming/">
            <img src="http://graysonforeman.com/wp-content/uploads/2016/03/Java.png" height="175" width="175">
         </a>
      </td>
   </tr>
   <tr>
      <td>Websites</td>
      <td>Writing</td>
      <td>Programming</td>
   </tr>
</table>

我还修复了您的tr和一个td

答案 2 :(得分:0)

您可以使用!important来覆盖其余部分。这是最高优先级的订单。

   <table border="0 ! important" cellspacing="0" cellpadding="0"       class="no_border">

覆盖另一个css优先级。我有一个关于https://youtu.be/NqDb9GfMXuo

的视频