December 28, 201015 yr Hi, Anybody can tell me how to use css sprites for repetitive image means how to repeat middle image in css. Thanks in advance.
December 28, 201015 yr Can you explain what you mean by "repeat middle image in css"? Sprites are combined images, either vertically or horizontally, where you set the height of the container just for the part of the image that ypu want to show, then each part is revealed on hover, visited, active or focus by moving the background-image. Where do you want to repeat the middle image?
December 28, 201015 yr Author Can you explain what you mean by "repeat middle image in css"? Sprites are combined images, either vertically or horizontally, where you set the height of the container just for the part of the image that ypu want to show, then each part is revealed on hover, visited, active or focus by moving the background-image. Where do you want to repeat the middle image? I want to repeat image by vertically. It is 300X1 size image and div height is 400px, so i want to repeat that image(background-image) repeat through whole div using css sprites. Can you please help me? Thanks Edited December 28, 201015 yr by Ketu
December 28, 201015 yr We need to see the whole page code and the sprite image you want to use to see how many links you have and how they fit into the div with height: 400px. Are you using ul and li tags for the links inside the div?
December 28, 201015 yr Author I have attached html and sprite image. So please check it and give me exact solution. I want class .article_middle repeatable. Edited December 28, 201015 yr by Ketu
December 28, 201015 yr Author I have attached html and sprite image. So please check it and give me exact solution. I want class .article_middle repeatable. index.html
December 28, 201015 yr i think it's not possible simply use another image to repeat it that will be faster and easier.
December 28, 201015 yr It's not possible to repeat a specific area of a sprite. For faster load time, and for the sake of actually achieving the desired effect, use another image, and use method provided by Lev in his post: Is that enough? To further explain why it doesn't work, it's like looking out your window, and wanting to see the same red car, repeating over and over, as far as you could see in either direction, but it is just a window, and no matter how hard you try, you will see a variety of cars parked outside. Now imagine that each car is an image in a sprite, what you see outside is the sprite image, and the window is the div.
Create an account or sign in to comment