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 5:14 PM
 
Well here's what I'm trying to do...and I'm sure some of you will gasp in horror when I tell you this...

I'm working on cross browser compatibility. I've tried some of the standard methods and they either wouldn't work or they end up breaking a different browser even more. So I decided to go with what that other developer did on the other project. He added a script block to the skin that pulls the current browser and loads the proper css file. It's actually easier than it seems in practice...if I can get it to work. But, like I said, I can't get it to load a custom css at all much less dynamically.

Here's what he did:


 
New Post
6/23/2011 2:24 AM
 
Ah, ok.
If your only trying to detect IE, the core styles skin object is ok.
If you need more options, you should use the stylehelper skin object.
It can detect all browsers (contrary to the styles SKO) and you can pass it a version too:
http://dnnskinextensions.codeplex.com...

It allows you to add JS or CSS files to the head of the page and much more.

Documentation here: http://bit.ly/ihe0KG

This would load a stylesheet for ie8-:
<%@ Register TagPrefix="fortyfingers" TagName="STYLEHELPER" Src="~/DesktopModules/40Fingers/SkinObjects/StyleHelper/StyleHelper.ascx" %>


(but you should obviously install the skin object first :-)
 
New Post
6/23/2011 10:31 AM
 
I was hoping to avoid third party solutions on something that should be fairly easy but I'll certainly give it a try. So you install StyleHelper as a desktop module?
 
New Post
6/23/2011 10:53 AM
 
Did the moderator delete the sample code?

invisiblestupid wrote:
Well here's what I'm trying to do...and I'm sure some of you will gasp in horror when I tell you this...

I'm working on cross browser compatibility. I've tried some of the standard methods and they either wouldn't work or they end up breaking a different browser even more. So I decided to go with what that other developer did on the other project. He added a script block to the skin that pulls the current browser and loads the proper css file. It's actually easier than it seems in practice...if I can get it to work. But, like I said, I can't get it to load a custom css at all much less dynamically.

Here's what he did:


Well here's what I'm trying to do...and I'm sure some of you will gasp in horror when I tell you this... I'm working on cross browser compatibility. I've tried some of the standard methods and they either wouldn't work or they end up breaking a different browser even more. So I decided to go with what that other developer did on the other project. He added a script block to the skin that pulls the current browser and loads the proper css file. It's actually easier than it seems in practice...if I can get it to work. But, like I said, I can't get it to load a custom css at all much less dynamically. Here's what he did:

 

 
New Post
6/23/2011 12:22 PM
 
No it's not the moderator, it's automated removal of JS, for security.
Please try to html encode your code before you post it.

And yes the stylehelper skin object installs like a regular module / Skin object.
 
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