EnableEmbeddedBaseStylesheet Odd Behavior

4 posts, 0 answers
  1. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 21 Nov 2012 Link to this post

    I have a RadMenu instance defined on a master page like this:

    <telerik:RadMenu runat="server" ID="rdMenu" Skin="CustomSkin" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" DataSourceID="menu" />

    For the main page of the site (not in a subfolder), this works exactly as expected - I have a CSS file that is linked to the page which contains both a modified version of the base stylesheet plus the contents of my custom skin's CSS. The problem I'm having is any page on a subfolder seems to be having the EnableEmbeddedBaseStylesheet property ignored so I get a reference to WebResource.axd for the base which throws off all of my CSS.

    Any guesses as to what would cause this property to be selectively applied when it should always be in effect? I'm on version 2012.3.1016.45.
  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 23 Nov 2012 Link to this post

    Hello digitall,

    Although EnableEmbeddedBaseStylesheet is set to false in case of having any controls on the page that have context, filtering or any kind of menu, this would load the WebResource.axd and ignore that property, thus overriding your custom base styles. This might be the reason for the described unusual behavior that you are facing.

    Kind regards,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 26 Nov 2012 Link to this post

    So what's the best way around this? My main menu instance needs to not indent by ~50px since I don't have that left column image (seen with the default skin here: http://demos.telerik.com/aspnet-ajax/menu/examples/overview/defaultcs.aspx), but other pages have grids which are likely loading context menu options (and with that, the base stylesheet/webresource.axd reference) even though I'm not using the context menus.
  5. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 29 Nov 2012 Link to this post

    Hello,

    Each menu item has style property padding-left set to 28px that is remain for icon if used. Please keep in mind that setting that property value to 0px would ignore that gap and place your text next to the left border. This would be an easy convenient workaround instead of disabling the base style sheet and the embedded skins. Please follow this approach in order to clear your menu items padding-left:

    <style type="text/css">
            .RadMenu .rmGroup .rmText {
                padding-left: 0px !important;
            }
        </style>

    Hope that this will lead you into right direction.

    Regards,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top