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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: JavaScript |
Control: ejRating |
Published Date: March 25, 2015 |
Last Revised Date: March 25, 2015
Tags: general

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

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon