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, ...Use DNN Classes in Skins for predictable resultsUse DNN Classes in Skins for predictable results
Previous
 
Next
New Post
4/2/2008 10:19 AM
 

Last night I spent about two hours "fixing" a skin that had basically nothing wrong with it other than the CSS.  The client had been working on the skin for several weeks and was really frustrated because CSS wasn't working correctly, Firefox displayed different that IE, and graphics overlapped text, etc.  The skin.css file was hundreds of lines, barely understandable and using Firefox's web developer tool bar showed as many as fourteen styles applied to a single item.

Forget that the client wasn't up to speed on the cascading portion of CSS, one of her major problems was that DNN applied styles she didn't know about.  She had a lot of styles applied at the <td> or <tr> level, sometimes wrapped with the same style in a <div> or <span>, and then a DNN control came in and overtook her style.  The simplest way to avoid this is to change the DNN style at the skin level, using the DNN class.  The various skinning resources and documents show the CSS order, and pretty much anything redefined at the skin.css level is what the browser will render.  The trick sometimes is knowing what the DNN style is.  Web toolbars for both Firefox and IE can help here.  Maybe an example:

The DNN Copyright control has a CSS style of  #dnn_dnnCOPYRIGHT_lblCopyright. A skin which had this code:span class="MyClass"></span><dnn:COPYRIGHT runat="server" id="dnnCOPYRIGHT" /></span>

<

Would not necessarily show any of the CSS effects of the MyClass class.  But if you eliminate the <span> and use the #dnn_dnnCOPYRIGHT_lblCopyright class in your CSS file, you get your desired results.

Hope this helps someone else as well as my client.  :)

Jeff

 

 
New Post
4/2/2008 4:03 PM
 

Jeff,

Using these ID's does work, but it's not a smart thing to do. (for upgrades)
Since these are id's generated by DNN , they sometimes change and your skin will fail.
(this recently happend to the login skin object)

The safe way here would be: .MyClass a:link {color:#F00;}

And I do agree skin.css is "loaded" but there are always backwards compatibility issues to consider, so changing it seems easier then it is.

 
New Post
4/2/2008 4:16 PM
 

lol Timo is correct I got burned hard when I had styled my login with the controller id instead of setting my attributes / overriding styles properly. Nothing like having to redo 36 skins and sending the updates to clients.

Now don't get me wrong I have been known to spend hours cussing DNN cause I can't get my CSS to cascade / overwrite as I think it should, but after getting burned so bad I tough it out, figure the proper cascade and typically learn a ton about DNN in the process.

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Use DNN Classes in Skins for predictable resultsUse DNN Classes in Skins for predictable results


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