他们不应该移动

时间:2015-06-01 12:02:36

标签: javascript html css

我创建了一个网页,并将div放在某些位置。不过我的问题是我在右边有一张联赛桌,左边有一些div。如果我改变表格左边的方框,例如它的高度或数据,那么表格将向上移动。这是我不想要的。即使我将框调整到左边,我也不希望桌子移动,我希望它保持在相同的位置和高度

<div class="wrap">
         <div id="boxInj">
             <h1 class="headinj">Injuries</h1>
        <p id="arsWriting">
         - M. Arteta (Doubt) <br> 
         - M. Debuchy (Doubt) <br> 
         - A. Oxlade-Chamberlain (Doubt) 
            </p>
         </div>
        <div id="boxSus">
             <h1 class="headinj" >Suspensions</h1>
        <p id="arsWriting" >
            - None
         </p>
        </div>
        </div>

        <div id="box">
             <h1 id="headinj">Player Statistics (All Competitions)</h1>
      <div id ="w"> <p id="arsWriting" class="sepStats"> <b>Top GoalScorers:</b> A. Sanchez (23) |  O. Giroud (18) | A. Ramsey (10) | S. Cazorla (8) | D. Welbeck (8) </p> </div>

         <div id ="e" >  </div>  

           <div id ="u" >   
           </div>

            <div id ="u" >   
        </div>

            </div>

                <div class="Newsbox">
                <h1 id="headnews">NewsPaper Articles</h1>
        <p id="arsWriting"> Currently Unavailble

         </p>

                </div>              



<div id="sidebar">
            <div class="box">

                    <table class="grid" cellspacing="0" cellpadding="0">
                        <caption>Premier League 14-15</caption>
                        <tbody><tr class="title"><td id="TeamNum">#</td><td id="TeamLength" colspan="1">Team</td><td class="stats" >P</td><td class="stats">W</td><td class="stats">D</td><td class="stats">L</td><td class="stats" class="Gdiff">GF</td><td class="stats" class="Gdiff">GA</td> <td class="stats" class="Gdiff">GD</td><td class="stats">Pts</td></tr>

<tr class="champion"><td>1.</td><td style="text-align: left;"><a id="h" href="Chelsea.html"><b>Chelsea</b></a></td><td>37</td><td>25</td><td>9</td><td>3</td><td>70</td><td>31</td><td>39</td><td class="bold">84</td></tr>

<tr class="league_champions"><td>2.</td><td style="text-align: left;"><a href="ManCity.html"><b> Man City</b></a></td><td>37</td><td>23</td><td>7</td><td>7</td><td>81</td><td>38</td><td>43</td><td class="bold">76</td></tr>

<tr class="league_champions ArsStand"><td>3.</td><td style="text-align: left;" ><a href="IndividualTeams.html"><b>Arsenal</b></a></td><td>37</td><td>21</td><td>7</td><td>7</td><td>67</td><td>35</td><td>32</td><td class="bold">72</td></tr>

<tr class="league_champions ArsStand"><td>4.</td><td style="text-align: left;"><a href="ManU.html"><b>Man Utd</b></a></td><td>37</td><td>20</td><td>9</td><td>8</td><td>62</td><td>37</td><td>25</td><td class="bold">69</td></tr>

<tr class="league_europa"><td>5.</td><td style="text-align: left;"><a href="Liverpool.html"><b>Liverpool</b></a></td><td>37</td><td>18</td><td>8</td><td>11</td><td>51</td><td>42</td><td>9</td><td class="bold">62</td></tr>

<tr><td>6.</td><td style="text-align: left;"><a href="Spurs.html"><b>Spurs</b></a></td><td>37</td><td>18</td><td>7</td><td>12</td><td>57</td><td>53</td><td>4</td><td class="bold">61</td></tr>

<tr><td>7.</td><td style="text-align: left;"><a href="Southampton.html"><b>Southampton</b></a></td><td>37</td><td>18</td><td>6</td><td>13</td><td>54</td><td>31</td><td>23</td><td class="bold">60</td></tr>

<tr><td>8.</td><td style="text-align: left;"><a href="Swansea.html"><b>Swansea</b></a></td><td>37</td><td>16</td><td>8</td><td>13</td><td>46</td><td>48</td><td>-2</td><td class="bold">56</td></tr>

<tr><td>9.</td><td style="text-align: left;"><a href="Stoke.html"><b>Stoke</b></a></td><td>37</td><td>14</td><td>9</td><td>14</td><td>42</td><td>44</td><td>-2</td><td class="bold">51</td></tr>

<tr><td>10.</td><td style="text-align: left;"><a href="Everton.html"><b>Everton</b></a></td><td>37</td><td>12</td><td>11</td><td>14</td><td>48</td><td>49</td><td>-1</td><td class="bold">47</td></tr>

<tr><td>11.</td><td style="text-align: left;"><a href="WestHam.html"><b>West Ham</b></a></td><td>37</td><td>12</td><td>11</td><td>14</td><td>44</td><td>45</td><td>-1</td><td class="bold">47</td></tr>

<tr><td>12.</td><td style="text-align: left;"><a href="Palace.html"><b>C Palace</b></a></td><td>37</td><td>12</td><td>9</td><td>16</td><td>46</td><td>51</td><td>-5</td><td class="bold">45</td></tr>

<tr><td>13.</td><td style="text-align: left;"><a href="WBA.html"><b>West Brom</b></a></td><td>37</td><td>11</td><td>11</td><td>15</td><td>37</td><td>47</td><td>-10</td><td class="bold">44</td></tr>

<tr class="dropout"><td>14.</td><td style="text-align: left;"><a href="Leicester.html"><b>Leicester City</b></a></td><td>37</td><td>10</td><td>8</td><td>19</td><td>41</td><td>54</td><td>-13</td><td class="bold">38</td></tr>                         

<tr><td>15.</td><td style="text-align: left;"><a href="Sunderland.html"><b>Sunderland</b></a></td><td>37</td><td>7</td><td>17</td><td>13</td><td>30</td><td>50</td><td>-20</td><td class="bold">38</td></tr>    

<tr><td>16.</td><td style="text-align: left;"><a href="AstonVilla.html"><b>Aston Villa</b></a></td><td>37</td><td>10</td><td>8</td><td>19</td><td>31</td><td>56</td><td>-25</td><td class="bold">38</td></tr>

<tr><td>17.</td><td style="text-align: left;"><a href="Newcastle.html"><b>Newcastle</b></a></td><td>37</td><td>9</td><td>9</td><td>19</td><td>38</td><td>63</td><td>-25</td><td class="bold">36</td></tr>

<tr><td>18.</td><td style="text-align: left;"><a href="Hull.html"><b>Hull City</b></a></td><td>37</td><td>8</td><td>10</td><td>19</td><td>33</td><td>51</td><td>-18</td><td class="bold">34</td></tr>

    <tr class="dropout"><td>19.</td><td style="text-align: left;"><a href="Burnley.html"><b>Burnley</b></a></td><td>37</td><td>6</td><td>12</td><td>19</td><td>27</td><td>53</td><td>-26</td><td class="bold">30</td></tr>

<tr class="dropout"><td>20.</td><td style="text-align: left;"><a href="QPR.html"><b>QPR</b></a></td><td>37</td><td>8</td><td>6</td><td>23</td><td>41</td><td>68</td><td>-27</td><td class="bold">30</td></tr>

                    </tbody></table>

                </div>  


         </div>       

继承我的代码https://jsfiddle.net/dtdkpfah/,这表示如果我改变一个方框,表格不会停留在一个位置。

0 个答案:

没有答案