It is very easy to generate CSS Sprites with just a few mouse clicks !
How to Use - CSS Sprites Generator
Just do the following steps :
Step 1 - Add ImagesAt first, you will have to add the images that you want to convert into CSS Sprites.
Just press the "Add Image" button or select "Add" from the "Image" menu.
Step 2 - Set sprite propertiesAfter adding your image you will have to select each image from the list on the left and then specify your desired css class names of your css sprite and also a label. The label is only there to help you identify the image in the css code.
For each image you add a new css class will be generated in the css code.
Step 3 - Set combined image and image placeholder URLs and filepathsThen you will have to specify the combined sprites image filepath to be generated. You can choose between GIF,PNG and JPG image file types.
You will have also to specify the URL of the combined sprites image, as it will be on your webpage.
Also, a placeholder image is required in order for CSS Sprites to work.
CSS Sprites Generator has already a default placeholder image that will get copied to your specified location.
You will have to specify the filepath of the placeholder to be generated and also its URL on your webpage.
Step 4 - Generate CSS SpritesAfterwards, press on the "Generate" button or select "Generate CSS Sprites" from the "Tools" menu and then the combined spirtes image will get generated along with the CSS and HTML code.
CSS Sprites Generator will generate one combined sprites image, a placeholder image and a css-sprites.html HTML file and a css-sprites.css CSS file.
Windows Explorer will open when done with the generated CSS file selected.
Step 5 - Upload filesThen you will have to upload the generated css image sprites image to your webpage and the placeholder image to your webpage and at the previously specified location.
Step 6 - Edit HTML, CSS code of your webpageLastly, you will have to edit your webpage's HTML and CSS code based on the generated HTML and CSS files.
The source URL of each image has to be replaced with the URL of the placeholder image and a css class has to be added to the image tag of each image. In your CSS code you will have to paste the CSS code that got generated.