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  |  

Affordable ASP.NET Hosting Service
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
 


  Sponsors  

Meet Our Sponsors

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


DotNetNuke Forums
 
  Forum  General DotNetN...  Make it Hot! ( ...  Containers - multiple colors?
Previous Previous
 
Next Next
New Post 3/13/2008 8:53 AM
Resolved
User is offline Paul Hermans
31 posts
www.benemtech.com
10th Ranked


Containers - multiple colors? 

Hi all,

I have made a basic skin (I'm still new to this) and container using ascx files. I am using various images to make the border (rounded corners etc) on the module. All of these are specified in the CSS file as follows:

#ContainerHeader

{vertical-align:top;}

#ContainerHeader

.Left {background: url(header_cap_left_purple.gif) bottom left no-repeat;width: 68px; height:54px; padding: 0;}

#ContainerHeader

.Actions {background: url(Header_Cap_Middle_Purple.gif) repeat-x bottom; padding: 0 0 10px 0; width: 1px;}

#ContainerHeader

.Head {background: url(Header_Cap_Middle_Purple.gif) repeat-x; font-size: 15px; background-repeat: repeat-x; padding-top: 25px; vertical-align:top;}

#ContainerHeader

.Right {background: url(Header_Cap_Right_Purple.gif) bottom left no-repeat; width: 100px; height:54px; padding: 0;}

#ContainerHeader

.Buttons {background: url(Header_Cap_Middle_Purple.gif) repeat-x bottom; padding-top: 25px; text-align: right;}

 

The important part of the .ascx file (for the header) is as follows:

<

td id="ContainerHeader" >

 

<table width="100%" cellpadding="0" cellspacing="0" border="0" style="table-layout: fixed">

 

<tr>

 

<td class="Left"><img src="<%= SkinPath %>spacer.gif" /></td>

 

<td class="Actions" nowrap><dnn:ACTIONS runat="server" id="dnnACTIONS" /></td>

 

<td class="Head" nowrap><dnn:TITLE runat="server" id="dnnTITLE" /></td>

 

<td class="Buttons" valign="top" nowrap>

 

<dnn:VISIBILITY runat="server" ID="VISIBILITY" />

 

<dnn:ACTIONBUTTON5 runat="server" ID="ACTIONBUTTON5" CommandName="ModuleHelp.Action" DisplayIcon="True" DisplayLink="False" />

 

<dnn:ACTIONBUTTON2 runat="server" ID="ACTIONBUTTON2" CommandName="SyndicateModule.Action" DisplayIcon="True" DisplayLink="False" />

 

<dnn:ACTIONBUTTON3 runat="server" ID="ACTIONBUTTON3" CommandName="PrintModule.Action" DisplayIcon="True" DisplayLink="False" />

 

<dnn:ACTIONBUTTON4 runat="server" ID="ACTIONBUTTON4" CommandName="ModuleSettings.Action" DisplayIcon="True" DisplayLink="False" />

 

</td>

 

<td class="Right"><img src="<%= SkinPath %>spacer.gif" /></td>

 

</tr>

 

</table>

 

</td>

 

Now I want to make an exact copy of the container, except that I want to use different images. The only difference in the images is the color.  Since my CSS declarations specifies a file name for backgrounds, it seems as though I am forced to make twice as many declarations (one for each color) and duplicate a ton of information.  kind of like this:

#ContainerHeader_Purple

{vertical-align:top;}

#ContainerHeader_Purple

.Left {background: url(header_cap_left_purple.gif) bottom left no-repeat; width: 68px; height:54px; padding: 0;}

#ContainerHeader_Purple

.Actions {background: url(Header_Cap_Middle_Purple.gif) repeat-x bottom; padding: 0 0 10px 0; width: 1px;}

#ContainerHeader_Purple

.Head {background: url(Header_Cap_Middle_Purple.gif) repeat-x; font-size: 15px; background-repeat: repeat-x; padding-top: 25px; vertical-align:top;}

#ContainerHeader_Purple

.Right {background: url(Header_Cap_Right_Purple.gif) bottom left no-repeat; width: 100px; height:54px; padding: 0;}

#ContainerHeader_Purple

.Buttons {background: url(Header_Cap_Middle_Purple.gif) repeat-x bottom; padding-top: 25px; text-align: right;}

#ContainerHeader_Green

{vertical-align:top;}

#ContainerHeader_Green

.Left {background: url(header_cap_left_Green.gif) bottom left no-repeat; width: 68px; height:54px; padding: 0;}

#ContainerHeader_Green

.Actions {background: url(Header_Cap_Middle_Green.gif) repeat-x bottom; padding: 0 0 10px 0; width: 1px;}

#ContainerHeader_Green

.Head {background: url(Header_Cap_Middle_Green.gif) repeat-x; font-size: 15px; background-repeat: repeat-x; padding-top: 25px; vertical-align:top;}

#ContainerHeader_Green

.Right {background: url(Header_Cap_Right_Green.gif) bottom left no-repeat; width: 100px; height:54px; padding: 0;}

#ContainerHeader_Green

.Buttons {background: url(Header_Cap_Middle_Green.gif) repeat-x bottom; padding-top: 25px; text-align: right;}

 

Is this the correct approach, or is there a better way?

Thanks in advance!

 

Paul Hermans

 
New Post 3/13/2008 11:39 AM
User is offline Jeff Cochran
1391 posts
6th Ranked


Re: Containers - multiple colors? 

Pretty much, that's the right way to do it.  You can combine CSS tags but it can be tricky to keep straight that way.

Jeff

 
New Post 3/13/2008 12:19 PM
User is offline Paul Hermans
31 posts
www.benemtech.com
10th Ranked


Re: Containers - multiple colors? 

Jeff,

Thanks for the confirmation that I was going down the right path.

Paul Hermans

www.benemtech.com

 

 
New Post 3/14/2008 2:25 AM
User is offline Timo Breumelhof
1693 posts
5th Ranked




Re: Containers - multiple colors? 

Paul,

You can use an include in the ASCX file for all the stuff that's the same for all contianers, that way It's easier to make changes later..

<!--#include file="includes/someinclude.inc"-->

And I gues you already  have all the general CSS in container.css and the contianer specific CSS in "containername".css?


Timo Breumelhof -- www.searchdotnetnuke.com -- Extended DNN (forum) search
 
New Post 3/14/2008 8:34 AM
User is offline Jeff Cochran
1391 posts
6th Ranked


Re: Containers - multiple colors? 

I actually find it harder to separate the CSS into an include or use containername.css if there are multiple containers on a page.  The files all get combined in the end anyway and one commented file is easier for me to maintain.

But, it does work to separate them.

Jeff

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Make it Hot! ( ...  Containers - multiple colors?
 


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.

 


Venexus, Inc.
Need custom a custom DotNetNuke module? From module planning to deployment, including training and support, Venexus developers deliver end-to-end web solutions on time and on budget.
www.venexus.com
Bring2mind
Document Centric DNN Module Solutions
www.bring2mind.net
WEBPC™ DotNetNuke® sites for Small Business
WEBPC™ are internet consultants and web hosters catering to the small business market.
www.webpc.biz

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