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  |  

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


  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Referencing a stylesheet in a module
Previous Previous
 
Next Next
New Post 6/11/2008 12:03 PM
Resolved
User is offline Joshua Beall
124 posts
9th Ranked


Referencing a stylesheet in a module 

Hello All,

I've got a module that makes a heavy use of CSS classes (defined in an external stylesheet).

How do I setup my module so that when it is installed, those CSS classes become available somehow?  Either through merging them into an existing, external stylesheet, or by adding a new external stylesheet reference in the <head> tag.

Up until now I've just been manually adding my CSS class definitions to the skin stylesheet.  But this is obviously not a very portable way to go.

  -Josh

 
New Post 6/11/2008 12:10 PM
Accepted Answer 
User is offline Brian Dukes
428 posts
www.engagesoftware.com
8th Ranked


Re: Referencing a stylesheet in a module 

DNN will load a file called module.css from any directory of any desktopmodules controls that it loads on the page.  So, if you put those styles in a file called module.css in your module's folder, DNN will include those styles in most circumstances.  If you have subdirectories in your module folder, then you'll need to figure out if you want different styles for each subdirectory, or whether you just want to import the main module.css for each subdirectory.

I hope that makes sense, let me know if that's what you were looking for.


Brian Dukes
Engage Software
St. Louis, MO
314.966.4000

The leading provider of DotNetNuke support, training and custom module development.
 
New Post 6/11/2008 12:12 PM
User is offline Kevin Gainey
3 posts
www.vekkin.com
10th Ranked




Re: Referencing a stylesheet in a module 

I recommend using the modules.css approach, but you can put a link statement at the beginning of your user control if you just HAVE to reference something external.

 
New Post 6/11/2008 1:25 PM
User is offline Joshua Beall
124 posts
9th Ranked


Re: Referencing a stylesheet in a module 

That's great!  Thanks!

 
New Post 6/11/2008 1:56 PM
User is offline Joshua Beall
124 posts
9th Ranked


Re: Referencing a stylesheet in a module 

 Brian Dukes wrote

DNN will load a file called module.css from any directory of any desktopmodules controls that it loads on the page.  So, if you put those styles in a file called module.css in your module's folder, DNN will include those styles in most circumstances.

Ok, I put a module.css file in place, but it's not getting pulled in.  Is there anything else I need to do in order to get this stylesheet referenced?

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Referencing a stylesheet in a module
 


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.

 


Mad Development: dotnetnuke design and development
We are an expert Dotnetnuke shop specializing in developing solutions that merge the requirements of design and branding, content management, ecommerce, search engine optimization and business logic.
www.MadDevelopment.com
telerik
telerik r.a.d.controls suite is the most innovative and comprehensive toolset for ASP.NET development, tailored for seamless integration with the DotNetNuke project. This integrated collection of controls allows professionals to build web-solutions with the UI richness and responsiveness of desktop applications.
dnn.telerik.com
CrystalTech
CrystalTech Web Hosting™ provides first-class service and support. Our value-packed ASP.NET plans offer DNN installation, SQL 2005 and up to 100 domain names starting at only $16.95 per month!
CrystalTech.com

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