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, ...CanCan't insert image using CSS
Previous
 
Next
New Post
2/21/2009 11:09 AM
 

Thanks for your help.

I don't have it on a live site, so I can't post a link, but I can post the source of the page and my css classes.  I modified the DNN menu provider to assign my own css classes and that's how the classes with the background images get assigned.

Here's how I have the DNN Nav:

<dnn:NAV runat="server" ID="dnnNAV" ProviderName="UCUMenuNavigationProvider" IndicateChildren="false"
                            ControlOrientation="Horizontal"
                            CSSContainerSub="main_dnnmenu_submenu" CSSNodeHoverSub="main_dnnmenu_itemhover"
                            CSSNodeSelectedSub="main_dnnmenu_itemselected" CSSContainerRoot="main_dnnmenu_container"
                            CSSControl="main_dnnmenu_bar" CSSNode="main_dnnmenu_bar" CSSBreak="main_dnnmenu_break" />
                    </div>


Notice I removed the following:

CSSNodeRoot="main_dnnmenu_rootitem" CSSNodeHoverRoot="main_dnnmenu_rootitem_hover"
                            CSSNodeSelectedRoot="main_dnnmenu_rootitem_selected" CSSBreadCrumbRoot="main_dnnmenu_rootitem_selected"

I did that because i didn't want those classes overriding mine.


In my provider I add the proper css classes at the node level.

 

Here's the source of a page where I have the Home tab selected:
Notice the css class assigned to the Home menu item:   homeSelected


<input name="__dnnVariable" type="hidden" id="__dnnVariable" value="dnn_dnnNAV_ctldnnNAV_xml&lt;root id=dnn_dnnNAV_ctldnnNAV>&lt;n bcrumb=1


selected=1 id=36 key=36 txt= ca=3 url=http://localhost/dnn490/Home/tabid/36/Default.aspx cssHover=homeHover cssIcon=  cssSel=homeSelected>


&lt;n id=56 key=56 txt=TestPage2 ca=3 url=http://localhost/dnn490/TestPage2/tabid/56/Default.aspx cssIcon=  />&lt;/root>SearchIconWebUrlurl(/DNN490/images/Search/google-icon.gif)SearchIconSiteUrlurl(/DNN490/images/Search/dotnetnuke-icon.gif)SearchIconSelectedS" />

 

Here's my css classes:
.homeHover
{
 background-image: url(nav_Home_on.gif);
 height: 32px;
 width: 100px;
}

.homeSelected
{
 background-image: url(nav_Home_active.gif);
 height: 32px;
 width: 100px;
}

.TestPage1Normal
{
 background-image: url(nav_Networks.gif);
 height: 32px;
 width: 200px;
 background-attachment: fixed;
 background-repeat: no-repeat;
}

Finally, here's the folder structure (it's the default dnn structure under default folder)

DNN490\Website\Portals\_default\Skins\MinimalExtropy/index.asx -- that's the skin

DNN490\Website\Portals\_default\Skins\MinimalExtropy/css/menu.css  -- classes are in this file, images are in this folder.

 

 
New Post
2/21/2009 5:18 PM
 

You HTML is a bit distorted now, but I do not see the homeSelected class in it.

I see cssSel=homeSelected, not class="homeSelected"

 
New Post
2/22/2009 3:48 AM
 

That's what the DNN Menu uses to indicate the css selected class for that node.  That html was generated by the menu provider.  So it shows the correct class is assigned (the other attributes of the css class show up so I know it is using that class), but the background image is not appearing.  I'm wondering if it's because an actual hyperlink control is used in the menu?  You can't assign background images to hyperlink controls in ASP.NET.  I'm thinking Jon Henning would know how this works, or someone on the menu team?

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...CanCan't insert image using CSS


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