Link to home
Start Free TrialLog in
Avatar of njgroup
njgroup

asked on

slice image using css sprite

hi,
I have this image:

 User generated image
I wanna the blue umbrella to be sliced using background and position css properties

I got it's coordination,

 x=111 px, y= 115 px
width = 34 px
height = 40 px

thanks
Avatar of Eternal_Student
Eternal_Student
Flag of United Kingdom of Great Britain and Northern Ireland image

You need something like this ... the coordinates are not completely accurate
.blueUmbrella{width:34px; height:40px; background:url(pokemon.gif) no-repeat -190px -83px;}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Eternal_Student
Eternal_Student
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of njgroup
njgroup

ASKER

the width is for div or to tell the image how long the width is for rectangle to cut?
The width is for the div, you use sprites as background images inside an element (such as a div).