Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Containers - multiple colors?Containers - multiple colors?
Previous
 
Next
New Post
3/13/2008 11:53 AM
 

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 2:39 PM
 

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 3:19 PM
 

Jeff,

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

Paul Hermans

www.benemtech.com

 

 
New Post
3/14/2008 5:25 AM
 

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?

 
New Post
3/14/2008 11:34 AM
 

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
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Containers - multiple colors?Containers - multiple colors?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out