More in this section
Forums / Developing with Sitefinity / Intrasite Module css files

Intrasite Module css files

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. viscious
    viscious avatar
    31 posts
    10 Aug 2006
    23 Jul 2007
    Link to this post
    Hello.  I am creating an intrasite module (the one that uses usercontrols for controlpanel and toolbox).  I was wondering if there is a way to include a module specific css file (for use on the backend).  I am finding that I need to create some specific rules to format certain things.

    I would prefer to not half to modify the default css files that come with sitefinity, but rather create a new one specific to the module i am working with.

    Is this possible, and how would I go about doing it?

  2. Nikolay
    Nikolay avatar
    21 posts
    24 Feb 2016
    24 Jul 2007
    Link to this post
    Hello viscious,
    For the whole Modules section, the file Modules.css is applied dinamicly. You need it for the common styles. However you can import your own css file in  that file to overwrite some styles or create new ones. How?
    Just open \Sitefinity\Admin\Themes\Default\Modules.css . There is 2 import rules at the top:
    @import url(reset.css);
    @import url(global1.css);

    Import your css file just beneath them, for example @import url(your.css);
    Notice, that all imported files must be at the top of the css, not below.

    However, there is a possibillity that you cannot overwriete some of the css styles in Modules.css, because they are specified AFTER your import. To overwrite them you need to write more specific selectors. For that reason, my suggestion is not to import an external css file, but write your styles in the end of Modules.css. Then there is no danger of poor overwriting (if your selectors are as specific as the styles in the files are).

    Kind regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered