HomeHomeUsing DotNetNuk...Using DotNetNuk...Skins, Themes, ...Skins, Themes, ...Custom CSS not loadingCustom CSS not loading
Previous
 
Next
New Post
6/22/2011 12:41 PM
 
Hello,
I'm fairly new to DNN and I'm having trouble with css (DNN version 5.00.01).  Right now, the site loads the default skin.css file as well as the .css file with the same name as the skin file (ie HomePage.ascx and HomePage.css) as well as various other css files.  That's fine, that works.  However on one of my skins I want to add custom css file.  And here's where I'm having trouble.  I'm starting with a test scenerio and can't get any results.  Here's what I have:

HomePage.ascx:
<link href="css/test.css" rel="stylesheet" type="text/css" media="all" />
...
<label class="MYtest">TEST</label>

css/test.css:
.MYtest {
 font-size: 150px;
 color: Red;
}

Once the css is linked, I can see the "MYtest" class in intellisense (in Visual Studio 2008) so to me that means it's linked properly.  But when I view the page, the content displays in a default black with a standard font size.  I look at the source and see that css/test.css is linked in there.  The next thing I check is my Web Developer plugin in Firefox.  I pull up the "View Style Information" feature and click on my text but it says "No style information".  How can I get the browser to display the custom css formatting with DNN?

I even tried creating a simple html file with the test label and linked it to my test.css just to make sure I wasn't screwing something up on the html or css and got the expected results...big and red.

Any ideas?
 
New Post
6/22/2011 1:51 PM
 
You will have to stick with the default stylesheet naming or the stylesheet will not be loaded.
Skin.css & Skinname.css are the files to use.

Web applications, DNN websites, modules, skins and support
 
New Post
6/22/2011 2:06 PM
 
Is this a new "feature"? We have another site here that uses DNN 4.09.00 and the original developer (who's no longer at the company) was able to add custom css files to his skins. I figured because it's not working the same way on my project that it was because of a setting I'm missing or some such.
 
New Post
6/22/2011 2:27 PM
 
No it's not new, but it might be he added them directly in the body of the skin. That's not allowed according to HTML standards, but it does work.
BTW, why would you need another style sheet then the default ones, do you have a special use case?

Web applications, DNN websites, modules, skins and support
 
New Post
6/22/2011 2:34 PM
 

You can add additional CSS files using the [STYLES] skin object. on the page linked below scroll down to the "Adding the link" title for an example.

http://www.psdtodnn.com/Blog/tabid/76...

Hope this helps,

Rick.



PSDtoDNN - You supply the artwork... we'll build the skins!™
Website | Twitter | YouTube | Skype
 
Previous
 
Next
HomeHomeUsing DotNetNuk...Using DotNetNuk...Skins, Themes, ...Skins, Themes, ...Custom CSS not loadingCustom CSS not loading


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Start  Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke (DNN) provides a suite of solutions that make designing, building and managing feature-rich sites and communities fast, easy and cost-effective. The DotNetNuke Platform CMS is the foundation for more than one million websites worldwide. DNN Social, our newest solution, enables businesses to create immersive, interactive communities. Thousands of organizations like True Value Hardware, Bose, Cornell University, Glacier Water, Dannon, Delphi, USAA, NASCAR, Northern Health and the City of Denver have leveraged DNN to deploy highly engaging business- critical websites. Our rapid growth in product sales and deployments resulted in DotNetNuke Corp. being named one of the fastest growing private companies in America by Inc. Magazine in 2011 and 2012.