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  |  

AspDotNetStoreFront
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Make it Hot! ( ...  Using @import
Previous Previous
 
Next Next
New Post 4/3/2008 12:44 PM
Unresolved
User is offline Dawn Fink
2 posts
10th Ranked


Using @import 

I am having a problem overwriting the default.css file that is used by the Events Calendar (\desktopmodules\events\themes\default\default.css).  The problem is the default.css file used by that module has !important sprinkled throughout.  So when I try to overwrite it in the skin.css, it is ignored.  I have been reading up on my inheritance, etc and found that if I import a style it will overwrite the !important used in the default.  However, when I try to use the @import in my html file, DNN just ignores it. 

So my question is two fold, how do you use @import and get DNN to recognize or how do I overwrite the default.css used by the Events Calendar without actually changing that file?  I do not want to have to go back everytime we upgrade and remake those changes.

 
New Post 4/3/2008 4:21 PM
User is offline Timo Breumelhof
1760 posts
5th Ranked




Re: Using @import 

skin.css should be loaded after any module.css, so you should be able to overwrite the values if you add the CSS there


Timo Breumelhof -- www.searchdotnetnuke.com -- Extended DNN (forum) search
 
New Post 4/4/2008 10:18 AM
User is offline Dawn Fink
2 posts
10th Ranked


Re: Using @import 

That is actually what I thought and what I did originally.  However since the default.css file in the themes directory is using !important, my styles in the skin.css are not overwriting them.  The module.css file is called but is empty.

 
New Post 4/4/2008 12:27 PM
User is offline John Valentine
129 posts
www.webinnovationsystems.com/
9th Ranked


Re: Using @import 

 Timo Breumelhof wrote

skin.css should be loaded after any module.css, so you should be able to overwrite the values if you add the CSS there

I have the same exact problem. Unfortuneately, I am looking at a core DNN module (in my case the Calendar module). It gets its style from the default.css class. When you read the rules for CSS (see below), you discover that the web browser deals with cascade conflicts by assigning weight to CSS classes. The root class is known as the author class - in this case it is the default.css class in DNN. There is no reason that anyone should EVER use "!important" in a default class unless you are positive that you NEVER want anyone to be able to overwrite your default definition. Even though this hard and fast rule has changed in recent years, many web applications are, unfortunately, behind the times and impliment older CSS standards. Since that seems to be the case here, DNN default skins and CSS classes should avoid the use of "!important".

For more about assigning property values, cascading, and inheritance please reference the following web page.

www.w3.org/TR/REC-CSS2/cascade.html

The use of the "!important" argument in the default.css class tells me that the original designers aren't really up to speed on the changes in CSS and didn't really adhear to the guiding standards upon which CSS was built in the first place. The only answer I have been able to come up with is to edit the default.css file and keep a change file that I need to merge every time I upgrade. It isn't the best solution, but its a good work around until the DNN dev team can correct this oversite and once again begin adhering to the standard.

Cheers!


Cheers!
John Valentine
http://www.webinnovationsystems.com
 
New Post 4/4/2008 1:12 PM
User is offline Michael Kamp
482 posts
8th Ranked




Re: Using @import 

 Dawn Fink wrote: how do I overwrite the default.css used by the Events Calendar without actually changing that file?

You don't have to use the Default theme (and with it the default.css). In the module settings you can select one of the other pre-installed themes (FixedBlue, Small, ...). And you can easily create your own themes - just copy one the existing ones, rename the folder and the .css file in it to the desired theme name! The next time you edit the module settings, the new theme will be available in the "Theme/Skin" select  box. AFAIK custom themes are not overwritten when upgrading.

Hope that helps!

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Make it Hot! ( ...  Using @import
 


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.

 


Powered by Adcuent®.Com
Adcuent® Consulting & Technology offers custom development web applications and hosting projects under the brand of Powered by Adcuent®.Com
www.adcuent.com
Easily Build DNN Solutions with XMod
XMod makes it easy to build news articles, house listings, custom feedback forms, product reviews and much more - without programming
www.DNNDev.com
Software Development and Integration with DNN
HNP Solutions focuses on the pragmatic use of technology and process to meet an organization's business objectives. HNP Solutions employs seasoned Enterprise and Solution Architects, Delivery Managers and QA & Business Leads. Our capabilities range from project assessments & recommendations, design & code reviews, to full program implementations. We also work with organizations in need of senior staff augmentation purposes in the areas of Enterprise and Solution architecture.
www.hnpsolutions.com

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