Php 我想修复一个响应WordPress功能框
我想为Eleven40 Pro Wordpress主题创建一个功能框。以下是我使用的PHP:Php 我想修复一个响应WordPress功能框,php,html,css,wordpress,Php,Html,Css,Wordpress,我想为Eleven40 Pro Wordpress主题创建一个功能框。以下是我使用的PHP: add_action( 'genesis_after_header', 'genesis_featured_box' ); function genesis_featured_box() { if ( is_front_page() && is_active_sidebar( 'featured-box' ) ) { genesis_widget_area( 'featur
add_action( 'genesis_after_header', 'genesis_featured_box' );
function genesis_featured_box() {
if ( is_front_page() && is_active_sidebar( 'featured-box' ) ) {
genesis_widget_area( 'featured-box', array(
'before' => '<div class="featured-box widget-area">',
'after' => '</div>',
) );
}}
我的问题是,当我展开浏览器窗口时,导航栏下的功能框顶部消失了。您可以在这里看到:
我怎样才能解决这个问题?
这容易使这个功能盒响应吗
感谢您的帮助。尝试通过媒体查询调整页边距:
@media screen and (min-width: 1024px) and (max-width: 1139px) {
div.featured-box {
margin-top: 135px;
}
}
@media screen and (min-width: 1140px) {
div.featured-box {
margin-top: 70px;
}
}
谢谢,差点就成功了。我如何调整它,使我的特征宽度永远不会超过1200像素?我想保持文本和图像在框内响应。你可以在Add
max width:1200px上看到我的当前版本代码>至。特色框
@media screen and (min-width: 1024px) and (max-width: 1139px) {
div.featured-box {
margin-top: 135px;
}
}
@media screen and (min-width: 1140px) {
div.featured-box {
margin-top: 70px;
}
}