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, ...Overriding the "Head" CSS Class -- appropriate way to do this?Overriding the "Head" CSS Class -- appropriate way to do this?
Previous
 
Next
New Post
6/16/2008 1:34 PM
 

Hi All,

I'm working on a skin that has multiple containers.  The module title's text color will vary depending on which container is in use.

By default, the <dnn:TITLE> control is wrapping the title in a <span class="Head"> tag.  This CSS style is defined in the default.css file.

I don't want to use that CSS class.  The color and size of the module title is all defined by my own CSS, and it varies from container to container.  But I can't seem to figure out a way to tell the dnn:TITLE control how to not apply the Head CSS class.

How do I do this?  Remember, I can't just redefine the Head class in one of my own stylesheets, cause the properties I want to set vary from container to container.

  -Josh

 
New Post
6/16/2008 3:01 PM
 

You can override the style in your container's CSS sheet. container CSS sheet overrides default and skin css sheets.

Another option though is to use the attribute to set what style for the container to use.

Containers xml:

<Object>
        <Token>[TITLE]</Token>
        <Settings>
            <Setting>
                <Name>CssClass</Name>
                <Value>CA_title_imageheader</Value>
            </Setting>
        </Settings>
    </Object>

Change the <Value> to the name of the style in your container CSS and there you go.

 

 
New Post
6/16/2008 3:17 PM
 

you could have a container that in container.css you define

.Head {    font-family:Verdana, Arial, Helvetica, sans-serif; font-size:13px; font-weight:bold; color:#BDBDBD;}
.Normal {font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight:Normal; color:#BDBDBD; padding:0; line-height:140%; letter-spacing:140%;}

/* Orange Text display */
#orange .Head {    font-family:Verdana, Arial, Helvetica, sans-serif; font-size:13px; font-weight:bold; color:#F7941D;}
#orange .Normal { font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight:Normal; color:#BDBDBD; padding:0;}

then if you put a div around the whole lot of the container like <div id="orange"> then you will be using the orange class and if your container does not have it which means you will be using the regular .HEAD

salar

 
New Post
6/16/2008 4:15 PM
 

Or you can learn how to optimize your CSS for faster performance as followed:

Instead of writing this:

.Head {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:13px; font-weight:bold; color:#BDBDBD;}

You can do this:

.Head {font: 13px bold #BDBDBD Verdana, Arial, Helvetica, sans-serif;}

Also, using pixel for font sizing is not an optimum choice. Use flexible font sizing approaches instead to accommodate multiple browsers and platforms for all users.


Cuong Dang
Co-founder: Enliven, dnnGallery
LinkedIn | Twitter
I'm the author of DNN and Web Standards Wrox Blox

 
New Post
6/16/2008 5:01 PM
 

Thanks for all the suggestions!

What I would really like to do is simply not apply the Head CSS class at all.  Is there any way to prevent the dnn:TITLE control from using that CSS class?

  -Josh

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Overriding the "Head" CSS Class -- appropriate way to do this?Overriding the "Head" CSS Class -- appropriate way to do this?


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