Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...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.
 
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?
 
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 DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Custom CSS not loadingCustom CSS not loading


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out