[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 317
  • Last Modified:

Variable width button using CSS and IE AlphaImageLoader filter for hover state

So this client is looking for a unique solution to a variable width button problem.  To get the variable width issue resolved, I used the sliding doors CSS method to get the button to look correct.  Unfortunately what this does is break the image into separate elements, and now I have no way to control the background state of both elements.  The css is included below, and I know this works correctly in IE.  Now what I need is for the

filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=image src='images/yellow.button.left.png');

to change the background element of both images.  Maybe this isn’t the best way to do this, but I need it to work properly.

Any suggestions?

<style type="text/css">
<!--
.buttonYellow {
    float:left;
    width:auto;
    font-size:11px;
    font-weight:bold;
    line-height:normal;
    }
.buttonYellow ul {
    margin:0;
    padding:0;
    list-style:none;
}
.buttonYellow li {
      float:left;
      margin:0;
      padding:0;
      background: url(images/yellow.button.right.png) no-repeat right top;
}
.buttonYellow a {
      display:block;
      background: url(images/yellow.button.left.png) no-repeat left top;
      text-decoration:none;
      color:#FFF;
      padding: 4px 11px 6px;
}
.buttonTellow a:hover {
      filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=image src='images/yellow.button.left.on.png');
}
-->
  </style>

<div class="buttonYellow"><ul><li><a href="#">Charlie</a></li></ul></div>
0
TankDesign
Asked:
TankDesign
  • 3
  • 2
1 Solution
 
trailblazzyr55Commented:
Hi TankDesign, do you have a link to your page?
0
 
TankDesignAuthor Commented:
Absolutely.

I made a page with where I'm at plus the other images.

http://www.davekilkenny.com/tank/buttonTemp.html

Thanks for your help
0
 
trailblazzyr55Commented:
here's a page on my test site that has what you're looking for, look at the view source to see how it's done...

http://www.cfusionx.com/demo/demo2.cfm
0
 
TankDesignAuthor Commented:
Is there any way to get it done with the transparency filter?
0
 
trailblazzyr55Commented:
alrighty, here's a link with a tutorial on how to use that gradient for IE only, this talks about buttons, but it can be adapted for tabs as well..

http://www.webreference.com/programming/css_stylish/
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now