如何消除 RadSiteMapNode 之间的间距?
Telerik RadSiteMap 控件发出以下 HTML:
<li class="rsmItem">
<div class="rsmTemplate">
_MY_NODE_TEMPLATE_
</div>
<div class="rsmColumnWrap"> </div>
</li>
.rsmColumnWrap 节点定义 10 像素的底部边距。
.RadSiteMap .rsmColumnWrap {
margin-bottom: 10px;
overflow: hidden;
}
如何在不完全重新定义样式的情况下删除或覆盖此节点?我在 DNN6 的上下文中操作,因此无法访问 RadStyleSheetManager。
The Telerik RadSiteMap control emits the following HTML:
<li class="rsmItem">
<div class="rsmTemplate">
_MY_NODE_TEMPLATE_
</div>
<div class="rsmColumnWrap"> </div>
</li>
The .rsmColumnWrap node defines a 10 pixel bottom margin.
.RadSiteMap .rsmColumnWrap {
margin-bottom: 10px;
overflow: hidden;
}
How would I remove or override this node without completely redefining the style? I'm operating within the context of DNN6 so I do not have access to the RadStyleSheetManager.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单的方法是使用 RadSiteMap 在页面上定义一个快速的 CSS 样式,该样式定义了您想要有多少(或没有)空白。您不需要访问 RadStyleSheetManager,只要您有办法将其压缩到标签中就可以了。所以像这样:
Telerik 皮肤的 CSS 特异性应该相当低,但如果这不能解决问题,你总是可以在边距样式旁边使用 !important 标签:
所以这仍然是重新定义样式,但是鉴于不必使用 RadStyelSheetManager (这也将覆盖您设置的任何皮肤的规则),我认为这将是您的最佳选择。
The easiest would be to just define a quick CSS style right on your page with the RadSiteMap that defines just how little (or no) white space you want to have. You wouldn't need access to the RadStyleSheetManager and as long as you have a way to squeeze it in the tag you'll be fine. So something like this:
The CSS specificity of the Telerik skins should be pretty low, but if that doesn't resolve the issue you can always just use the !important tag next to your margin style:
So this is still redefining the style, but in light of not having to use the RadStyelSheetManager (this will override the rule for any skin you set too) I think this would be your best option.