Html 在 Wordpress 中隐藏表格边框

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35229177/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 18:54:49  来源:igfitidea点击:

Hide table border in Wordpress

htmlcsswordpress

提问by Maverick

I want to hide the table border of table within a Wordpress site. I already figured out, that my theme is setting the table border as standard and deleted the corresponding line of code.

我想在 Wordpress 站点中隐藏表格的表格边框。我已经想通了,我的主题是将表格边框设置为标准并删除了相应的代码行。

My problem now is: The table border is still visible! Has someone of you guys a tip for me to solve this problem?

我现在的问题是:表格边框仍然可见!你们中有人给我解决这个问题的提示吗?

Here is a link to the website: http://studifutter.com/2732-2/

这是网站的链接:http: //studifutter.com/2732-2/

Thank you very much in advance.

非常感谢您提前。

Best regards, Maverick

最好的问候,特立独行

As requested, here you can see my current code:

根据要求,您可以在此处查看我当前的代码:

<table style="border-color: #ffffff; background-color: #ffffff;" border="none">
<tbody>
<tr>
<td>
<h4>über den Autor</h4>
</td>
<td></td>
</tr>
<tr>
<td style="text-align: justify;"><strong>Vorname Nachname</strong>?tempor cum
soluta nobis?eleifend option congue
nihil imperdiet?doming id quod
mazim placerat facer?possim assum.
Lorem ipsum dolor sit?amet,
consectetuer adipiscing elit, sed?diam
nonummy nibh euismod. soluta?nobis
eleifend option liber tempor cum
solute.</td>
<td><img class=" wp-image-2548" src="http://studifutter.com/wp-content/uploads/2016/01/Maske-300x225.jpg" alt="H?ufiges Ph?nomen in Asien: Person mit Atemschutz. (Bild 2)" width="251" height="188" /></td>
</tr>
</tbody>
</table>

回答by Kcoitk

If you need to hide table border then use:

如果您需要隐藏表格边框,请使用:

.entry-content table {
    border: 0px;
}

If you need to hide table's TR border then use:

如果您需要隐藏表格的 TR 边框,请使用:

.entry-content table tr {
    border: 0px;
}

To Hide TD borders then use:

要隐藏 TD 边界,请使用:

.entry-content table > thead > tr > th, 
.entry-content table > tbody > tr > th, 
.entry-content table > tfoot > tr > th, 
.entry-content table > thead > tr > td, 
.entry-content table > tbody > tr > td, 
.entry-content table > tfoot > tr > td {
    border: 0px;
}

回答by Pmpr

Under

在下面

<div class="clearfix entry-content">

You have a table.

你有一个table.

To remove its border, you may add this to your CSS file at the bottom:

要删除其边框,您可以将其添加到底部的 CSS 文件中:

.entry-content table tr{
    border: none;
}