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, ...rollover - skin like dnn siterollover - skin like dnn site
Previous
 
Next
New Post
2/27/2007 11:48 AM
 
I want to create rollover buttons in my skin, but I am having issues with javascript etc like many other posts I have seen. All I want to do is replicate this site and the way the downloads / directory / forums links etc have icons rather than use the solpart menu. Can anyone tell how this was done. Creating rollovers in photoshop is easy enough but I thibk it probably uses a css?

Anyone?

cheers

Tom
 
New Post
2/28/2007 4:03 AM
 

You can do this in more than one way. One approach is to have two background images, swapping one for the other on a mouse over event.

In your ascx:

    <div class="imagesarea" >
     <a class="link01" href="/Default.aspx?tabid=72"></a>
     <a class="link02" href="/Default.aspx?tabid=53"></a>
    ...
    </div>

in the css:

The css in the link01class has an on hover:

.imagesarea a
{
 margin: 0px; padding: 0px; border: solid 0px #ffffff;
 height: 100px;
 width: 100px;
 display: block;
 float: left;
 margin: 0 2px 0 2px;
}

a.link01
{
 background-image: url(images/photo1.jpg);
}
a.link01:hover
{
 background-image: url(images/photo2.jpg);
}

I can't show you the site because it is behind a firewall.

Peter


Peter Schotman
Cestus Websites voor DotNetNuke oplossingen in Nederland
Contact us for your custom design and skinning work.
 
New Post
2/28/2007 6:52 AM
 
Thanks, just what i needed

cheers

tom
 
New Post
2/28/2007 12:49 PM
 

I would add one little trick to Peter's excellent instruction, in order to pre-load the mouseover images so the user sees no delay.

Near the beginning of the .ascx file, after the declarations, embed the hover image invisibly in this way:
<img src="<%= SkinPath %>images/photo2.jpg" alt="" class="hiddenPic">
And in the .css file, add the "hiddenPic" style:
.hiddenPic{ display:none }

Works like a charm...

 
New Post
2/28/2007 2:37 PM
 

Nice trick Sam!

Another way would be to have both images in one image, that is, next to eachother, and use background positioning:

a.someclass {
 background: url(images/image.jpg) 0 0 no-repeat;
 width: 96px;
}
a.someclass:hover{
 background-position: -96px 0px;
}

Works like a charm ;)

Peter


Peter Schotman
Cestus Websites voor DotNetNuke oplossingen in Nederland
Contact us for your custom design and skinning work.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...rollover - skin like dnn siterollover - skin like dnn site


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