我对 wordpress 生成的 HTML 有疑问 - 我不知道如何使用 css 定位它。我在 footer.php 中创建了一个页脚菜单:
<?php
/* main footer file */
?>
<footer>
<div id="oblaci"></div>
<div class="footer-nav">
<div id="footer-logo">
<a href="#"><img src="<?php bloginfo('template_url') ?>/img/koprivko-
min.png"></a>
</div>
<?php wp_nav_menu( $arg = array(
'menu_class'=> 'footer-nav',
'theme_location' => 'footer'
)); ?>
</div>
</footer>
<?php wp_footer(); ?>
</body>
</html>
我正在尝试使用 css 定位下图中 wordpress 元素生成的 ul(#menu-footer-nav),并设置属性:#menu-footer-nav{width:auto; 高度:自动; 背景:无
最佳答案
如果 Wordpress 将一个 ID 附加到导航(就像它所做的那样),您可以简单地定位它在您的 CSS 中提供的 ID/类。在这种情况下:
ul#menu-footer-nav {
width:auto;
height:auto;
background:none;
}
关于html - wordpress 生成的 css 未被应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48463854/