>>  Site Map >>  Forums >>  Blocks 6x

Forum module - topics in forum:



Blocks 6x - Discussions regarding PHP-Nuke Blocks.



Tables inside blocks?

I want to put a league table (Premiership table) onto my site as a block. I've used tables, and it all looks very nice, except there's a huge gap at the top, and I see no reason for why it shows. It's like Arrow this, and never mind the fact that the data is a few weeks old...

The code is like this...

Code: :
<tr><td><b>Pos</b></td> <td><b>Teams</b></td><td><b>Points</b></td>

<tr><td><b>1.</b></td> <td>Arsenal</td> <td>67</td></tr><br />

<tr><td><b>2.</b></td> <td>Chelsea</td> <td>58</td></tr><br />


... Just like this the whole way along for every team...

Code: :
<tr><td><b>19.</b></td> <td>Leicester</td> <td>23</td></tr><br />

<tr><td><b>20.</b></td> <td><i>Leeds</i></td> <td>22</td></tr><br /><br />

<tr><td colspan="3">Table information from <a href="http://www.4thegame.com">www.4thegame.com</a>.</td></tr>


I'll post the rest of the code if you need to see it...






Ok I had a go with your code but it would be easier if I could see the whole table code but this Arrow Here Is what I ended up with and this :
Code: :
<html>
<head>
<title>Table</title>
</head>

<body>

<table width=150 cellpadding=2 cellspacing=0 rules=none border=1>
 <tbody>
  <tr><td colspan=3 valign=top align=middle bgcolor=#000055><font size=2 color=#FFFFFF>League Tables</font></td></tr>
  <tr><td bgcolor=#CCCCFF><font size=2><b>Pos</b></font></td><td bgcolor=#CCCCFF><font size=2><b>Teams</b></font></td><td bgcolor=#CCCCFF><font size=2><b>Points</b></font></td></tr>
  <tr><td><font size=2><b>1.</b></font></td><td><font size=2>Arsenal</font></td><td><font size=2>67</font></td></tr>
  <tr><td><font size=2><b>2.</b></font></td><td><font size=2>Chelsea</font></td><td><font size=2>58</font></td></tr>
  <tr><td><font size=2><b>19.</b></font></td><td><font size=2>Leicester</font></td><td><font size=2>23</font></td></tr>
  <tr><td><font size=2><b>20.</b></font></td><td><i><font size=2>Leeds</font></i></td><td><font size=2>22</font></td></tr>
  <tr><td colspan="3" valign=middle align=center><font size=2>Table information from <a href="http://www.4thegame.com">www.4thegame.com</a>.</font></td></tr>
 </tbody>
</table>

</body>
</html>

Is the code I used to get it obviously I would have used a css style sheet instead of all the typing but it wouldn't have helped ya much.

hope this helps if not can I see the rest of the code ?






Weird... the small table looks perfect, but when I implement the big one the same way, it doesn't work...

Here's the whole lot...

Code: :
<table>
<tr><td><b>Pos</b></td><td><b>Teams</b></td><td><b>Points</b></td></tr>

<tr><td><b>1.</b></td> <td>Arsenal</td><td>67</td></tr>
<tr><td><b>2.</b></td> <td>Chelsea</td><td>58</td></tr>
<tr><td><b>3.</b></td> <td>Man United</td> <td>58</td></tr><br />
<tr><td><b>4.</b></td> <td>Newcastle</td> <td>42</td></tr><br />
<tr><td><b>5.</b></td> <td>Charlton</td> <td>40</td></tr><br />
<tr><td><b>6.</b></td> <td>Liverpool</td> <td>39</td></tr><br />
<tr><td><b>7.</b></td> <td>Aston Villa</td> <td>37</td></tr><br />
<tr><td><b>8.</b></td> <td>Fulham</td> <td>36</td></tr><br />
<tr><td><b>9.</b></td> <td>Birmingham</td> <td>36</td></tr><br />
<tr><td><b>10.</b></td> <td>Tottenham</td> <td>34</td></tr><br />
<tr><td><b>11.</b></td> <td>Bolton</td> <td>34</td></tr><br />
<tr><td><b>12.</b></td> <td>Southampton</td> <td>33</td></tr><br />
<tr><td><b>13.</b></td> <td>Middlesbrough</td> <td>31</td></tr><br />
<tr><td><b>14.</b></td> <td>Everton</td> <td>29</td></tr><br />
<tr><td><b>15.</b></td> <td>Blackburn</td> <td>28</td></tr><br />
<tr><td><b>16.</b></td> <td>Man City</td> <td>27</td></tr><br />
<tr><td><b>17.</b></td> <td>Portsmouth</td> <td>24</td></tr><br />
<tr><td><b>18.</b></td> <td>Wolves</td> <td>24</td></tr><br />
<tr><td><b>19.</b></td> <td>Leicester</td> <td>23</td></tr><br />
<tr><td><b>20.</b></td> <td><i>Leeds</i></td> <td>22</td></tr><br /><br />

<tr><td colspan="3">Table information from <a href="http://www.4thegame.com">www.4thegame.com</a>.</td></tr>







ok the problem you are having is because of the line breaks you are entering at the end of each row.
Can't understand Y you are putting them there all you need is </tr> at the end so get rid of all the <br /> at the end of each line and you'll be ok






Ah... that makes sense... I hate tables...




Attention! You are currently viewing sitemap page!
We strongly suggest to look at original content

Search from web

Valid HTML 4.01 Valid CSS