We help IT Professionals succeed at work.
Get Started

Alpha Image loader repeat and top left

addmarketing
addmarketing asked
on
1,212 Views
Last Modified: 2012-05-05
I'm trying to get a star rating script working using a png file the htc fix gives me error messages and doesn't do what I want it to do because it eliminates position and and makes it where nothing is click able not counting the JavaScript alert that comes up. So im attempting to use the alpha image loader but I cant get the background position to repeat or goto top left. Anyone try this yet? Or a css star rating script using a transparent png thats compat with ie6 might work as well.
<style type="text/css">
	/*             styles for the star rater                */	
	.star-rating{
		list-style:none;
		margin: 0px;
		padding:0px;
		width: 150px;
		height: 30px;
		position: relative;
		background-repeat: top left repeat-x;
 
 filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
            src='images/star_rating.png', enabled=true, sizingMethod='image');
 
            
	/*	background: url(images/star_rating.png) top left repeat-x;		*/
	}
	.star-rating li{
		padding:0px;
		margin:0px;
		height:30px;
		width: 30px;		
		/*\*/
		float: left;
		/* */
	}
	.star-rating li a{
		display:block;
		width:30px;
		height: 30px;
		line-height:30px;
		text-decoration: none;
		text-indent: -9000px;
		z-index: 20;
		position: absolute;
		padding: 0px;
		overflow:hidden;
	}
	.star-rating li a:hover{
		background: url(images/star_rating.png) left center;
		z-index: 2;
		left: 0px;
		border:none;
	}
	.star-rating a.one-star{
		left: 0px;
	}
	.star-rating a.one-star:hover{
		width:30px;
	}
	.star-rating a.two-stars{
		left:30px;
	}
	.star-rating a.two-stars:hover{
		width: 60px;
	}
	.star-rating a.three-stars{
		left: 60px;
	}
	.star-rating a.three-stars:hover{
		width: 90px;
	}
	.star-rating a.four-stars{
		left: 90px;
	}	
	.star-rating a.four-stars:hover{
		width: 120px;
	}
	.star-rating a.five-stars{
		left: 120px;
	}
	.star-rating a.five-stars:hover{
		width: 150px;
	}
	.star-rating li.current-rating{
		background: url(images/star_rating.png) left bottom;
		position: absolute;
		height: 30px;
		display: block;
		text-indent: -9000px;
		z-index: 1;
	}
	/* remove halo effect in firefox   */
	a:active{
		outline: none;
	}		
</style>

Open in new window

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE