Star Ratings Inline?
Star Ratings Inline?
Hi all,
I have a series of controls I want to put inline. A few links and a star rating plugin.
I've tried mighty hard to get this done in a CSS-ey way, but so far no luck and I'm not sure where to go next.
The line would look something like this:
- <div id="actions">
- <span class="action"><a href="http://www.facebook.com/share.php">share</a></span>
- <span id="myrating_main">
- <?php
- $checked = round($myRating * 2);
- for ($i = 1; $i <= 10; $i++) {
- ?><input name="star2" type="radio" class="star" value="<?php print $i; ?>"<?php
- if ($checked == $i) {
- ?>checked="checked"<?php
- }
- ?>/>
- <?php
- }
- ?>
- </span> <!-- /id myrating_main -->
- <span class="action"><a href="#" onclick="javascript: dostuff();">results+comments</a></span>
- <span class="action"><a href="#" onclick="javascript: dostuff();">skip</a></span>
- </div>
(I've stripped out some identifying details to protect the innocent.)
Yes, I am calling the appropriate star initializer (either "$('#myrating_main').stars();" or "$('.stars').rating();", based on which plugin I am trying.
Also, #actions is styled to center on the page.
The problem is that, when I run this code, the three <span>s with links center nicely, but the rating bar left aligns on the page. The code seems to indicate that the bars are comprised of a lot of intermixed divs with some advanced CSS that I don't understand.
My next step is to replace #actions with a (gasp) table, as, unfortunately, that seems to be how the two plugins I tried[1][2] demo code on their page as well.
Suggestions welcome!
jsdf
[1]http://orkans-tmp.22web.net/star_rating/
[2]http://www.fyneworks.com/jquery/star-rating/