We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to adjust the Height and Width of those stars in the rating control?

You can customize the size of rating control stars by using the custom CSS as the stars in the rating component are just sprite icons.

Customizing the size of the stars:

To increase the height and width of the stars, use smaller or larger sprite icons as per the requirement. By using the shapeHeight and shapewidth properties, you can increase the height of the wrapper of the element that holds the sprite image.

To include a sprite icon with the custom size (16x16) and to write the custom CSS to change other effects for this new sprite image use the following code:

HTML

JavaScript

CSHTML

ASPX

CSS

The following screenshot is the output of the above code with the rating control star of 16x16 size.

                                                             

                                                                    Rating control star with default size

                                                              

                                                                     Rating control star with 16X16 size

A sample with the rating image of 16 x 16 is available in the following location. In the same way, you can customize the size of the stars to various widths and heights. You can find the custom CSS and image on the content folder.

Sample location

Article ID: Published Date: Last Revised Date: Platform: Control:
4318 03/25/2015 03/25/2015 JavaScript ejRating
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.