在 Wordpress 的 Breadcrumb NavXT 插件中应用样式时出现问题
我在将我的样式应用到 Breadcrumb NavXT 插件时遇到了巨大的问题。
当我使用 Breadcrumb NavXT 插件将样式应用于 WP 文档中的插件时,最后一段文本始终被前面的彩色箭头覆盖。
我已经尝试了明显的答案,例如对最后一个孩子应用边距权,但没有任何效果。真的很感激一些帮助。
这是 WP 输出的相关 html:
<!-- Breadcrumb NavXT 3.9.0 -->
<a title="Go to Blog." href="http://www.media.co.uk/wp">Blog</a> >
<a title="Go to Email & SMS Broadcasting." href="http://www.media.co.uk/wp/
email-sms-broadcasting/">Email & SMS Broadcasting</a> > Data List
Management </div><!--END breadcrumb -->
这是相关的CSS:
.breadcrumb{ list-style:none; overflow:hidden; position:absolute; font:10px
Helvetica,Arial,Sans-Serif; top:160px; float:left}
.breadcrumb a{ color:white; text-decoration:none; padding:2px 0 2px 35px;
background:blue; background:#728c8c; position:relative; display:block; float:left}
.breadcrumb a:after{ content:""; display:block; width:0; height:0;
border-top:50px solid transparent; border-bottom:50px solid transparent; border-
left:30px solid #728c8c; position:absolute; top:50%; margin-top:-50px; left:100%;
z-index:2}
.breadcrumb a:before{ content:""; display:block; width:0; height:0; border-
top:50px solid transparent; border-bottom:50px solid transparent; border-left:30px
solid white; position:absolute; top:50%; margin-top:-50px; margin-left:1px;
left:100%; z-index:1}
.breadcrumb a:first-child { padding-left:10px;}
.breadcrumb a:nth-child(2) {background: #768c72}
.breadcrumb a:nth-child(2):after{border-left-color:#768c72}
.breadcrumb a:nth-child(3) {background: #909673}
.breadcrumb a:nth-child(3):after{border-left-color:#909673}
.breadcrumb a:nth-child(4) {background: #ad7601}
.breadcrumb a:nth-child(4):after{border-left-color:#ad7601}
.breadcrumb a:nth-child(5) {background: #E3E8E8}
.breadcrumb a:nth-child(5):after{border-left-color:#E3E8E8}
.breadcrumb a:nth-child(6) {background: #728c8c}
.breadcrumb a:nth-child(6):after{border-left-color:#728c8c}
.breadcrumb a:nth-child(7) {background: #768c72}
.breadcrumb a:nth-child(7):after{border-left-color:#768c72}
.breadcrumb a:last-child a{background:transparent !important; color:black;
pointer-events:none; cursor:default;}
.breadcrumb a:hover{background:#526476}
.breadcrumb a:hover:after{border-left-color:#526476 !important}
I am having enormous problems applying my styles to the Breadcrumb NavXT plugin.
When I apply the styles to the plugin in the WP document using the Breadcrumb NavXT plugin the last piece of text is always covered by the preceding colored arrow.
I have tried the obvious answers like apply margin-right to the last-child but nothing is working. Would really be grateful for some help.
Here is the relevant html that WP is outputting:
<!-- Breadcrumb NavXT 3.9.0 -->
<a title="Go to Blog." href="http://www.media.co.uk/wp">Blog</a> >
<a title="Go to Email & SMS Broadcasting." href="http://www.media.co.uk/wp/
email-sms-broadcasting/">Email & SMS Broadcasting</a> > Data List
Management </div><!--END breadcrumb -->
Here is the relevant css:
.breadcrumb{ list-style:none; overflow:hidden; position:absolute; font:10px
Helvetica,Arial,Sans-Serif; top:160px; float:left}
.breadcrumb a{ color:white; text-decoration:none; padding:2px 0 2px 35px;
background:blue; background:#728c8c; position:relative; display:block; float:left}
.breadcrumb a:after{ content:""; display:block; width:0; height:0;
border-top:50px solid transparent; border-bottom:50px solid transparent; border-
left:30px solid #728c8c; position:absolute; top:50%; margin-top:-50px; left:100%;
z-index:2}
.breadcrumb a:before{ content:""; display:block; width:0; height:0; border-
top:50px solid transparent; border-bottom:50px solid transparent; border-left:30px
solid white; position:absolute; top:50%; margin-top:-50px; margin-left:1px;
left:100%; z-index:1}
.breadcrumb a:first-child { padding-left:10px;}
.breadcrumb a:nth-child(2) {background: #768c72}
.breadcrumb a:nth-child(2):after{border-left-color:#768c72}
.breadcrumb a:nth-child(3) {background: #909673}
.breadcrumb a:nth-child(3):after{border-left-color:#909673}
.breadcrumb a:nth-child(4) {background: #ad7601}
.breadcrumb a:nth-child(4):after{border-left-color:#ad7601}
.breadcrumb a:nth-child(5) {background: #E3E8E8}
.breadcrumb a:nth-child(5):after{border-left-color:#E3E8E8}
.breadcrumb a:nth-child(6) {background: #728c8c}
.breadcrumb a:nth-child(6):after{border-left-color:#728c8c}
.breadcrumb a:nth-child(7) {background: #768c72}
.breadcrumb a:nth-child(7):after{border-left-color:#768c72}
.breadcrumb a:last-child a{background:transparent !important; color:black;
pointer-events:none; cursor:default;}
.breadcrumb a:hover{background:#526476}
.breadcrumb a:hover:after{border-left-color:#526476 !important}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将
Data List Management
包装在span
中,然后添加CSS:您可以将
float: right
更改为display: inline< /code> 但这在 IE7 中不起作用。您还可以将其更改为
float: left
- 这可能更好 - 但这似乎会导致>
HTML 出现问题。编辑
根据Breadcrumb NavXT文档,您可以使用以下代码将当前元素项包装在跨度中:
You could wrap
Data List Management
in aspan
and then add the css:You can change
float: right
todisplay: inline
but that would not work in IE7. You could also change it tofloat: left
- which is probably better - but this seems to cause issues with the>
HTML.Edit
According to the Breadcrumb NavXT Documentation, you can use the following code to wrap your current element item in a span: