ionic-rating icon indicating copy to clipboard operation
ionic-rating copied to clipboard

Stars are not coming inline (in row)

Open amitbravo opened this issue 8 years ago • 12 comments

at Ionicframework, stars are not coming a one row , I tried to change in ionic-rating.css ul.rating li { } but does not change anything, however, i can see there is already display: inline being used but it is not working .

amitbravo avatar Apr 18 '16 10:04 amitbravo

same problem here +1

toxic2302 avatar Jun 02 '16 19:06 toxic2302

Hi, You must have a css conflict somewhere, I already got this issue and it was because of a rule being overwritten somewhere (it was long time ago and I don't remeber unfortunately) You can check this codepen as an example : http://codepen.io/vlafranca/pen/GoxVKL

I recommend you to inspect the stars with a debugger (chrome, firefox etc.) and look at the css rule being overwritten.

vlafranca avatar Jun 02 '16 20:06 vlafranca

Hey, thanks for this little tutorial but it doesn't work. I'm using this rating tag in an <form> element between two <input>fields. I have added a css class with display: inline-block but it doesn't change anything.

Do you have some more tricks for me? :smile:

toxic2302 avatar Jun 03 '16 10:06 toxic2302

Can you make a codepen please ? Le 3 juin 2016 12:36 PM, "Florian Kolb" [email protected] a écrit :

Hey, thanks for this little tutorial but it doesn't work. I'm using this rating tag in an

element between two fields. I have added a css class with display: inline-block but it doesn't change anything.

Do you have some more tricks for me? 😄

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fraserxu/ionic-rating/issues/32#issuecomment-223547028, or mute the thread https://github.com/notifications/unsubscribe/AHTaSyULA6iH6ReOa1At4CZZkxqTHliXks5qIAPEgaJpZM4IJlAR .

vlafranca avatar Jun 03 '16 10:06 vlafranca

Codepen is created and it works but not in my project :(

http://codepen.io/toxic2302/pen/ZOGpdp

toxic2302 avatar Jun 03 '16 11:06 toxic2302

So the error comes from your project ^^ you have to debug ... Le 3 juin 2016 1:14 PM, "Florian Kolb" [email protected] a écrit :

Codepen is created and it works but not in my project :(

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fraserxu/ionic-rating/issues/32#issuecomment-223553268, or mute the thread https://github.com/notifications/unsubscribe/AHTaSyBTvg5l2CdEhvdYXsnZbbdHNKtSks5qIAyjgaJpZM4IJlAR .

vlafranca avatar Jun 03 '16 11:06 vlafranca

Yes I have to debug my project. I think it crashed with the materialize css. I have tested this in a diffrent codepen. http://codepen.io/toxic2302/pen/VjLmeG

toxic2302 avatar Jun 03 '16 12:06 toxic2302

I have the same issue. I'm using the component inside a <li> element with ng-repeat. For example:

<ul class="list">
    <li ng-repeat="comment in dish.comments | orderBy:orderText">
        <blockquote>
            <rating readonly="true" ng-model="comment.rating" max="maxRating"></rating>
            <p>{{comment.comment}}</p>
        </blockquote>
    </li>
</ul>

If the css class it's being overwritten must be by the ionic css classes. How I can solve this ?

ciroanacleto avatar Jun 20 '16 03:06 ciroanacleto

Hi, as @vlafranca said, there were a css class overwriting my <li>tag and so the stars not comming in line. I copied the directive css class and add in my project css file. This way worked fine.

ciroanacleto avatar Jun 26 '16 01:06 ciroanacleto

Thank you @ciroanacleto. I have copied the css classes from ionic-rating in my own style.css and now it works. ;)

toxic2302 avatar Jul 10 '16 09:07 toxic2302

@toxic2302 There are a better way. Import the directive's css in your index.html, like this :

<link href="lib/ionic-rating/ionic-rating.css" rel="stylesheet">

Will work too.

ciroanacleto avatar Jul 10 '16 16:07 ciroanacleto

<link href="lib/ionic-rating/ionic-rating.css" rel="stylesheet"> Worked for me

wasa4587 avatar Sep 05 '16 00:09 wasa4587