Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Maximum ASP
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Make it Hot! ( ...  Use DNN Classes in Skins for predictable results
Previous Previous
 
Next Next
New Post 4/2/2008 7:19 AM
User is offline Jeff Cochran
1287 posts
6th Ranked


Use DNN Classes in Skins for predictable results 

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 1:03 PM
User is offline Timo Breumelhof
1621 posts
5th Ranked




Re: Use DNN Classes in Skins for predictable results 

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.


Timo Breumelhof -- www.searchdotnetnuke.com -- Extended DNN (forum) search
 
New Post 4/2/2008 1:16 PM
User is offline keeperofstars
252 posts
9th Ranked


Re: Use DNN Classes in Skins for predictable results 

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 Previous
 
Next Next
  Forum  General DotNetN...  Make it Hot! ( ...  Use DNN Classes in Skins for predictable results
 


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.

 


Aricie
Aricie is one of the French pioneers and experts in DotNetNuke technology.
www.aricie.com
AFUEGO!
Looking for Free DNN Hosting?
www.AFUEGO.com
Code 5 Systems, LLC.
The DNN Missing Link: A Form Module. Form Master 1.6 is an intuitive Form Creation Module at a great price. Quality Custom Module development, and DNN consulting services.
www.code5systems.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP