空间导航元素 WordPress 二十十主题

发布于 2024-10-09 03:44:33 字数 359 浏览 3 评论 0原文

我正在建立一个基于 WordPress 二十主题的网站。我想设计导航栏的样式,以便选项卡分布在顶部,但我有点不知所措。 这是导航栏:http://screencast.com/t/AbIPglmGtQ 这是CSS: http://pastebin.com/pSnCGcrQ

另外,有人知道添加分段吗在选项卡之间,即“主页 | 关于 | 服务?

任何帮助将不胜感激。很乐意在假期前在这个项目中进行分叉!

亚历克斯

I am building a site on the WordPress Twenty Ten theme. I would like to style the navigation bar so the tabs are spread out across the top but am at a bit of a loss.
Here is the navbar: http://screencast.com/t/AbIPglmGtQ
Here is the CSS: http://pastebin.com/pSnCGcrQ

Also, would anyone have a clue as to adding segmentation between the tabs ie" Home | About | Services?

Any help would be much appreciated. Would love to put a fork in this project before the holidays!

Alex

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

划一舟意中人 2024-10-16 03:44:33

首先,您可能想要创建一个 子主题,因为否则当 TwentyTen 更新时,您将丢失您的所有自定义设置。至于将它们间隔开 - 这取决于......您是否希望它们间隔开而不扩展每个链接的当前宽度,或者您是否也想扩展每个链接的宽度?有点令人困惑,但您可以通过增加边距来扩展它,例如:

margin: 0 15px;

但是,这只会将它们分散得更多 - 链接的大小将保持不变。要更改链接的大小,请同时调整填充。我会把两者结合起来。

对于分隔符,在 header.php 的 appx 第 85 行中,您将看到类似以下内容:

<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

将其更改为:

<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'after'           => '|', 'theme_location' => 'primary' ) ); ?>

应该添加一个 |在每个链接之后。希望有帮助。让我们知道!

First of all, you'll probably want to create a Child Theme, because otherwise when TwentyTen is updated, you'll lose all of your customizations. As far as spacing them out - it depends... do you want them to be spaced without expanding the current width of each link, or do you want to expand each link's width also? Kind of confusing, but you can expand it by increasing the margin to something like:

margin: 0 15px;

But, that'll just spread them out more - the size of the links will stay the same. To change the size of the links, adjust the padding as well. I'd do a little combination of both.

For the separator, in header.php, appx line 85, you'll see something like:

<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

change that to:

<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'after'           => '|', 'theme_location' => 'primary' ) ); ?>

That should add a | after each link on there. Hope that helps. Let us know!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文