From 8a0ab4e1c7d70c6b004669353c8705fd65fb825a Mon Sep 17 00:00:00 2001
From: Andrew Berry <deviantintegral@gmail.com>
Date: Thu, 28 Jun 2012 09:50:43 -0400
Subject: [PATCH] Issue #660772: Use spans instead of divs for the static
 widget.

---
 css/fivestar.css | 10 +++++-----
 fivestar.module  |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/css/fivestar.css b/css/fivestar.css
index 0709272..e598904 100644
--- a/css/fivestar.css
+++ b/css/fivestar.css
@@ -24,15 +24,15 @@ form.fivestar-widget input {
 }
 
 /* Static View-only Star Version */
-div.fivestar-widget-static {
+.fivestar-widget-static {
   display: block;
 }
 
-div.fivestar-widget-static br {
+.fivestar-widget-static br {
   clear: left; /* RTL */
 }
 
-div.fivestar-widget-static .star {
+.fivestar-widget-static .star {
   float: left; /* RTL */
   width: 17px;
   height: 15px;
@@ -41,14 +41,14 @@ div.fivestar-widget-static .star {
   background: url(../widgets/default/star.gif) no-repeat 0 0; /* RTL */
 }
 
-div.fivestar-widget-static .star span.on {
+.fivestar-widget-static .star span.on {
   display: block;
   width: 100%;
   height: 100%;
   background: url(../widgets/default/star.gif) no-repeat 0 -32px; /* RTL */
 }
 
-div.fivestar-widget-static .star span.off {
+.fivestar-widget-static .star span.off {
   display: block;
   width: 100%;
   height: 100%;
diff --git a/fivestar.module b/fivestar.module
index ff2bfaf..6962b7a 100644
--- a/fivestar.module
+++ b/fivestar.module
@@ -1398,7 +1398,7 @@ function theme_fivestar_widget($form) {
  */
 function theme_fivestar_static($rating, $stars = 5, $tag = 'vote') {
   $output = '';
-  $output .= '<div class="fivestar-widget-static fivestar-widget-static-'. $tag .' fivestar-widget-static-'. $stars .' clear-block">';
+  $output .= '<span class="fivestar-widget-static fivestar-widget-static-'. $tag .' fivestar-widget-static-'. $stars .' clear-block">';
   if (empty($stars)) {
     $stars = 5;
   }
@@ -1409,7 +1409,7 @@ function theme_fivestar_static($rating, $stars = 5, $tag = 'vote') {
     $zebra = ($n % 2 == 0) ? 'even' : 'odd';
     $first = $n == 1 ? ' star-first' : '';
     $last = $n == $stars ? ' star-last' : '';
-    $output .= '<div class="star star-'. $n .' star-'. $zebra . $first . $last .'">';
+    $output .= '<span class="star star-'. $n .' star-'. $zebra . $first . $last .'">';
     if ($rating < $star_value && $rating > $prev_star_value) {
       $percent = (($rating - $prev_star_value) / ($star_value - $prev_star_value)) * 100;
       $output .= '<span class="on" style="width: '. $percent .'%">';
@@ -1421,9 +1421,9 @@ function theme_fivestar_static($rating, $stars = 5, $tag = 'vote') {
       $output .= '<span class="off">';
     }
     if ($n == 1)$output .= $numeric_rating;
-    $output .= '</span></div>';
+    $output .= '</span></span>';
   }
-  $output .= '</div>';
+  $output .= '</span>';
   return $output;
 }
 
-- 
1.7.11

