如何更改<article> php元素样式

时间:2018-11-15 17:50:08

标签: html css

我正在尝试基于wordpress模板建立自己的网站。有一个主要问题:文章在html中设置了它自己的元素样式,而我在style.css或任何其他文件中找不到它 这就是我得到的:

<article id="post-26" class="post-item post-26 post type-post status-publish format-standard has-post-thumbnail hentry category-uncategorized" style="position: absolute; left: 0px; top: 0px;">

这是我的archive.php:

<article id="post-<?php the_ID(); ?>" <?php post_class('post-item'); ?>>

如何删除绝对排名?

1 个答案:

答案 0 :(得分:0)

如果只是几个页面的问题,我会使用JavaScript解决WordPress中的设计问题(当custom style.css不够时)。

从信息中心(... / wp-admin)编辑绝对path所在的页面/帖子。切换到“文本”视图(而非“视觉”)。在文本框中任何文本的末尾插入以下代码。

<article>

在这里,我们只是使用元素的ID和<script> document.getElementById('post-26').style.position = null; </script> 中的removing the style来选择元素。

Here is a picture of all this

相关问题