我在上使用骨架主题this website.
我想做的是将标题;页脚“填充”屏幕的所有水平空间,同时使主要内容保持原样。
我已经研究了其他几个线程,但我无法找到骨架主题的解决方案。
有很多方法可以实现这一点。
首先,现在您的所有内容(包括页眉和页脚)都在.container
宽度为960px。当这些div位于该容器内时,您无法使其100%宽度。因此,您需要的是通过将页眉和页脚移出容器来更改代码。我已经创建了一个示例here.
使现代化
在标题中。正文标记后的php:
<?php st_above_header();?>
<?php st_header();?>
<?php st_below_header();?>
<?php st_navbar(); ?>
<div id="wrap" class="container">
在页脚中。正文标记前的php: </div> <!-- End container -->
<?php st_before_footer();?>
<div class="inner-wrap"><?php wp_footer();?></div>
<span class="border"></span>
<?php st_after_footer();?>
</div> <!-- End page container -->
CSS:#footer {
margin:0;
height:auto;
width:100%;
bottom:0;
/* stick to bottom */
background:#0C2044;
border-top: 7px solid #549290;
}
#header {
margin:0;
width:100%;
border-bottom: 7px solid #DD013F;
}
.inner-wrap, .inner, #megaMenu {
margin: 0 auto;
padding: 0;
position: relative;
width: 960px;
}
#page-container {
position:relative;
/* needed for footer positioning*/
margin:0 auto;
/* center, not in IE5 */
width:100%;
background:#f0f0f0;
height:auto !important;
/* real browsers */
height:100%;
/* IE6: treaded as min-height*/
min-height:100%;
/* real browsers */
}
.border {border-top: 7px solid #DD013F;width:100%; height:7px; float:left;}
#navigation {
margin: 0 0 1.5em;
width: 100%;
background: #549290;
}
#megaMenu.megaFullWidth {
width:100%;
max-width:960px;
}
我正在使用最新的Wordpress 3.6。我想使用js向页面添加一些HTML代码。我放了一个<script> $(\'p.content\').addClass(\'highlight\'); </script> 脑袋里有,但没用。因此,我想将类highlight添加到calss=content的p元素中。我之所以要使用它,是为了更改wordpress中的\\u内容输出。我只想把文字放在。。。我还想了解如何通过功能等改变这