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, ...Help with rollover buttonsHelp with rollover buttons
Previous
 
Next
New Post
6/14/2008 10:13 AM
 

This is my first attempt at rollover buttons. I've used the technique where you have both states in one graphic and slide it up and down. I using only one graphic and trying to have the text generated from the HTML markup.

It is looking pretty much how I want it to, however you only get the hover effect when your mouse cursor is exactly over the text.

I have spent hours trying to figure out how to make the hover be the entire button area. Someone please take pity on me and give me some advice!

www.amgdraftinganddesign.com

Thanks!

~Bee

 
New Post
6/14/2008 12:23 PM
 

Most likely you are forgetting to use the CSS style display:block.

This style should be on the link that contains your text.  If this doesn't work just post the code you are using here so we can look at it.

-James

 
New Post
6/14/2008 4:43 PM
 

This code is embarrassing, but every time I try to clean it up the whole thing breaks. I tried the display block and nothing changed.

 

 

{
width:728px;
height:54px;
background: transparent url(images/BlackGreyButtons.gif) repeat-x;
background-position: 0 0;
background-color: black;
overflow: hidden;
position: relative;
text-align: center;
margin-left: auto;
margin-right: auto;
font-size: 54px;
z-index: 1;
border-bottom: 1px;
border-bottom-color: #626262;
border-style: solid;
text-decoration: none;
cursor: pointer;
}
ul{
border: 0;
margin: 0;
padding: 0;
list-style-type: none;
text-align: center;
clear: left;
text-decoration: none;
}
ul li{
display: block;
height: 54;
float: left;
text-align: center;
padding: 0;
margin: 0;
text-decoration: none;
}

#cssMenu

 

ul li a:link span{
color: white;
background-color: transparent;
text-decoration: none;
line-height: 77px;
font-weight: bold;
border: 0;
}

#cssMenu

 

ul li a:visited span {
color: white;
background-color: transparent;
text-decoration: none;
line-height: 77px;
font-weight: bold;
border: 0;
}

#cssMenu

ul li a:hover span{
color: black;
background-color: transparent;
text-decoration: none;
line-height: 77px;
font-weight: bold;
border: 0;
}

#cssMenu

ul li a:active span{
display: block;
color: black;
background-color: transparent;
text-decoration: none;
line-height: 77px;
font-weight: bold;
border: 0;
}

#cssMenu

ul li a{
width:180px;
height:54px;
margin:0px;
padding:0px;
display: inline;
text-decoration: none;
font-size: 13px;
font-weight: bolder;
font-family: Arial, helvetica, Sans-Serif;
vertical-align: 50%;
cursor: pointer;
}

/* CSS Navigation Menu Hovers -- */

#cssMenu

ul li a.portfolio:hover{ background: url(images/BlackGreyButtons.gif) 0px -54px; }

#cssMenu

ul li a.services:hover{ background: url(images/BlackGreyButtons.gif) 180px -54px; }

#cssMenu

ul li a.pricing:hover{ background: url(images/BlackGreyButtons.gif) 360px -54px; }

#cssMenu

ul li a.contact:hover{ background: url(images/BlackGreyButtons.gif) 540px -54px; }

#cssMenu

ul li a.portfolio:active{ background: url(images/BlackGreyButtons.gif) 0px -54px; }

#cssMenu

ul li a.services:active{ background: url(images/BlackGreyButtons.gif) 180px -54px; }

#cssMenu

ul li a.pricing:active{ background: url(images/BlackGreyButtons.gif) 360px -54px; }

#cssMenu

ul li a.contact:active{ background: url(images/BlackGreyButtons.gif) 540px -54px; }

 

<!--CSS buttons -->

<div

id="cssMenu">

 

<ul>

 

<li><a href="http://www.amgdraftinganddesign.com/" class="portfolio" target="_self"><span>PORTFOLIO</span></a></li>

 

<li><a href="http://www.amgdraftinganddesign.com/Services/tabid/91/Default.aspx" class="services" target="_self"><span>SERVICES</span></a></li>

 

<li><a href="http://www.amgdraftinganddesign.com/Pricing/tabid/92/Default.aspx" class="pricing" target="_self"><span>PRICING</span></a></li>

 

<li><a href="http://www.amgdraftinganddesign.com/ContactUs/tabid/93/Default.aspx" class="contact" target="_self"><span>CONTACT US</span></a></li>

</ul></div>

 

<!--End CSS buttons -->

 
New Post
6/14/2008 7:44 PM
 

I don't have an exact url to use for your images so it is kind of hard to tell if things are working or not, but did you try it on this tag:

ul li a{
width:180px;
height:54px;
margin:0px;
padding:0px;
display: inline;  <----- CHANGE TO DISPLAY:BLOCK
text-decoration: none;
font-size: 13px;
font-weight: bolder;
font-family: Arial, helvetica, Sans-Serif;
vertical-align: 50%;
cursor: pointer;
}

 

It seems as if the rollover works as you want it when that is changed; i just can't tell if it is messing with the placement of your hover background image or not.

-James

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Help with rollover buttonsHelp with rollover buttons


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