2

I have implemented rateYo's rating plug-in, which I really like. I am confounded by why the stars insist on breaking into a new line. My test-site illustrates the problem.

I tried styling the div with display: inline and inline-block as well as whitespace: nowrap to no avail. I also tried styling the label with display: inline. There isn't an option for the plugin relating to this issue. What am I missing?

<label for="min-rating" >Minimum Rating:</label>
<div id="min-rating"></div>

If you elect to downvote this question, please include a reason so I can learn from my mistakes.

NooBskie
  • 3,761
  • 31
  • 51
ron tornambe
  • 10,452
  • 7
  • 33
  • 60
  • Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: [How to create a Minimal, Complete, and Verifiable example.](http://stackoverflow.com/help/mcve) – rockerest Jun 06 '16 at 02:36

2 Answers2

2

By default, divs have display: block which makes it start on a new line. If you add this to your CSS it will work:

#min-rating {
    display: inline-block;
}
J Delaney
  • 589
  • 4
  • 17
0

Perhaps you could try to insert it in a table

<table cellspacing=10>
  <tr>
    <td>
      <label for="min-rating" >Minimum Rating:</label>
    </td>
    <td>
      <div id="min-rating">****</div>
    </td>
  </tr>
</table>

Note: I added a few little stars (****) for demonstration. you may remove it if you wish

Ronnie Matthews
  • 473
  • 4
  • 13