Advertisement

10.20.2007 at 09:20AM PDT, ID: 22906645
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

CSS Ruler problem positioning multiple <div> containers

Asked by gemdeals395 in Cascading Style Sheets (CSS)

Tags: , , ,

This is a CSS issue as another guy was wanting me to build a dynamic ruler that he can add peoples scores to the array and have them move up & down the ruler. Well When you see this code in action youll see that it does what he wants BUT when we get to scores round to the same number to display on it is putting them on top of each other. See what you guys think will straighten it out. We can just display them to the right of each other. Thanks

<?php
      @session_start();
      $scores = array(array('name'  => 'bob',      
                                      'score' => '58.0'
                                     ),
                              array('name'  => 'jill',
                                      'score' => '52.3'
                                     ),
                              array('name'  => 'jack',
                                      'score' => '48.1'
                                     ),
                              array('name'  => 'tom',
                                      'score' => '44.2'
                                     ),
                              array('name'  => 'mary',
                                      'score' => '35.9'
                                     ),
                              array('name'  => 'rick',
                                      'score' => '35.5'
                                      ),
                              array('name'  => 'don',
                                      'score' => '27.8'
                                      ),
                              array('name'  => 'moe',
                                      'score' => '23.3'
                                      )
                          );
      $high_score = (int) 0;
      $i = count($scores);
      $j = 0;
      for($k = 0; $k < $i; $k++) {
            if($scores[$j]['score'] > $high_score) {
                  $high_score = (int) $scores[$j]['score'];
            }
            $j++;
      }
      $rulerTop = substr($high_score, 0, 1);
      $rulerTop++;
      $rulerTop .='0';
      echo('<table>');
      for($l = $rulerTop; $l >= 20; $l--) {
            echo('<tr>');

                  if(substr($l, 1, 2) == '0') {
                        echo('<td style="border-right: thin solid blue"><b>'."$l".'</b>&nbsp;</td>');
                  } else {
                        if($l & 1) {
                              echo('<td valign="middle" style="text-align:right; border-right: thin solid blue"></td>');
                        } else {
                              echo('<td valign="middle" style="text-align:right; border-right: thin solid blue">--</td>');
                        }
                  }

            $n = '';
            for($m = 0; $m < $i; $m++) {
                  if(round($scores[$m]['score']) == $l) {
                        $n .= '<td style="padding-top: 0px; padding-left: 0px; padding-right: 0px; padding-bottom: 0px;"><div id="'."$m".'outer" name="'."$m".'outer" style="position: relative; z-index: '."$m".';"><div id="'."$m".'inner" name="'."$m".'inner" style="position: absolute; bottom: -10px; z-index: '."$m".';">&nbsp;';
                        $n .= $scores[$m]['score'];
                        $n .= '&nbsp;';
                        $n .= ucwords($scores[$m]['name']);
                        $n .= '</div></div</td>';
                  }
            }
            echo("$n");
            echo('</tr>');
      }
      echo('</table>');
?>

You can see close to the bottom here where I have all the css trying to control the output form. He said it looked fine in firefox as Im using Safari and that he had a slight adjustment for IE so ill just use the PHP commands to check the browser and adjust the offset.Start Free Trial
 
 
[+][-]10.21.2007 at 11:30PM PDT, ID: 20121139

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Cascading Style Sheets (CSS)
Tags: css, ruler, div, multiple
Sign Up Now!
Solution Provided By: Synthetics
Participating Experts: 1
Solution Grade: A
 
 
[+][-]10.22.2007 at 08:54AM PDT, ID: 20124102

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628