开发者

How do I remove the spacing between RadSiteMapNodes?

开发者 https://www.devze.com 2023-03-26 09:23 出处:网络
The Telerik RadSiteMap control emits the following HTML: <li class=\"rsmItem\"> <div class=\"rsmTemplate\">

The Telerik RadSiteMap control emits the following HTML:

<li class="rsmItem">
<div class="rsmTemplate">
  _MY_NODE_TEMPLATE_
</div>
  <div class="rsmColumnWrap"> </div>
</li>

T开发者_如何学运维he .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.


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:

    <style type="text/css">
       .RadSiteMap .rsmColumnWrap {
           margin-bottom: 5px;
           overflow: hidden;
       }
   </style>

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:

    <style type="text/css">
    .RadSiteMap .rsmColumnWrap {
        margin-bottom: 5px !important;
        overflow: hidden;
    }
</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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号