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  |  

DotNetNuke Marketplace
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Make it Hot! ( ...  Containers - multiple colors?
Previous Previous
 
Next Next
New Post 3/13/2008 9: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 12:39 PM
Online now... Jeff Cochran
1558 posts
5th 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 1: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 3:25 AM
User is offline Timo Breumelhof
1760 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 9:34 AM
Online now... Jeff Cochran
1558 posts
5th 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.

 


Get Smarter Mail, SmarterStats, SmarterTickets
Windows mail server, web log analytics, and customer service management software - Free Editions Available!
www.smartertools.com
DotNetNuke Modules, Skins, Training and Consulting
If you want DotNetNuke done right then look no further. Developed Solutions provides module development, skin design, user and developer training and consulting. Based in Adelaide, Australia, we offer our services worldwide.
www.developedsolutions.com.au
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

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