Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][PHP]Problem z tabelą na stronie...
Enderlanas
post
Post #1





Grupa: Zarejestrowani
Postów: 21
Pomógł: 0
Dołączył: 18.04.2010

Ostrzeżenie: (10%)
X----


Witam, mam problem...
Otóż stworzyłem sobie stronę, a na niej 3 tabele. Pierwszą tabelą jest menu po lewej stronie, drugą jest treść strony, a trzecią- statystyki po prawej stronie. Następnie zrobiłem w php skrypt rankingu. I jeśli w nim ustawię, aby wyświetlał 10 największych rekordów, to jest ok, natomiast jeśli ustawię 20 rekordów, to trzeba przewijać stronę, przez co rozjeżdża się prawa tabela, a dokładniej zjeżdża na dół, i jest niżej od tabeli lewej, co brzydko wygląda. Tak wygląda mój kod:

  1. <?php
  2.  
  3. session_start();
  4.  
  5. if (isset($_SESSION['user_id']) and isset($_SESSION['login']))
  6.  
  7. {
  8. ?>
  9. <br>
  10.  
  11. <style type="text/css">
  12. @import url(ranking.css);
  13.  
  14.  
  15. <link rel="Stylesheet" type="text/css" href="style.css" />
  16.  
  17.  
  18. <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
  19. <meta name="ProgId" content="FrontPage.Editor.Document">
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  21. <meta http-equiv="Content-Language" content="pl">
  22. <title>Jestem hardkorem!</title>
  23. </head>
  24.  
  25.  
  26. <div align="center">
  27. <table border="0" cellpadding="6" width="946" height="469">
  28. <tr>
  29. <td width="143" height="36"></td>
  30. <td colspan="2" nowrap width="615" height="36">
  31. <p align="center"><font size="6"> <a href="index.php"><img src="logo.png" border="0"></a></font></td>
  32. <td width="144" height="36"></td>
  33. </tr>
  34. <tr>
  35. <td valign="top" width="143" height="405"><center>
  36. <?php
  37. require('lewemenu.php');
  38. ?>
  39. <td valign="top" width="584" height="405"><marquee><b><u><?php include('szybkinews.txt'); ?></b></u></marquee><p>
  40. <font size="2"><h1><b><u>Ranking</u></b></h1><p>
  41.  
  42.  
  43.  
  44.  
  45. <script language="JavaScript" type="text/javascript" src="wz_tooltip.js"></script>
  46. <?php
  47. require('conn.php');
  48.  
  49. $wynik = mysql_query("SELECT * FROM user ORDER BY doswiadczenie DESC LIMIT 10")
  50. or die('Błšd zapytania');
  51.  
  52.  
  53. if(mysql_num_rows($wynik) > 0) {
  54. /* jeżeli wynik jest pozytywny, to wy?wietlamy dane */
  55. echo "<table cellpadding=\"2\" border=\"0\" bordercolor=\"white\" width=\"400\" id=\"ranking\">";
  56. while($r = mysql_fetch_assoc($wynik)) {
  57. echo "<tr>";
  58.  
  59. echo "<td onmouseover=\"Tip('Nick')\" onmouseout=UnTip() class=\"mov11\" href=\"java script:void(0)\">".$r['login']."</td>";
  60.  
  61. echo "<td onmouseover=\"Tip('Doświadczenie')\"
  62. onmouseout=UnTip() class=\"mov11\" href=\"java script:void(0)\" bordercolor=\"white\">".$r['doswiadczenie']."</td>";
  63.  
  64. echo "<td onmouseover=\"Tip('Respekt')\"
  65. onmouseout=UnTip() class=\"mov11\" href=\"java script:void(0)\" bordercolor=\"white\">".$r['respekt']."</td>";
  66.  
  67. echo "<td onmouseover=\"Tip('Kasa')\"
  68. onmouseout=UnTip() class=\"mov11\" href=\"java script:void(0)\" bordercolor=\"white\">".$r['kasa']."</td>";
  69.  
  70. echo "<td onmouseover=\"Tip('Poziom')\"
  71. onmouseout=UnTip() class=\"mov11\" href=\"java script:void(0)\" bordercolor=\"white\">".$r['poziom']."</td>";
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. echo "</tr>";
  80. }
  81. echo "</table>";
  82. }
  83. ?>
  84. </body>
  85. </i></font></td>
  86. <td valign="top" width="0" height="405"></td>
  87. <td width="144" height="405">
  88. <div align="center" style="width: 144; height: 458">
  89. <font size="2">
  90.  
  91.  
  92. <?php
  93. require('prawemenu.php');
  94. ?>
  95. <table border="0" cellPadding="6" width="96%">
  96.  
  97.  
  98. <p><font size="2"><strong><center></strong></font><font size="3"><br><br>
  99. </font><font size="2"><center>
  100.  
  101.  
  102. </center></td>
  103. </tr>
  104. </table>
  105. </center>
  106. </div>
  107. &nbsp;</td>
  108. </tr>
  109. </table>
  110. </center>
  111. </div>
  112.  
  113.  
  114. <?php
  115. }
  116.  
  117. else
  118.  
  119. {
  120.  
  121. echo "Nie jesteś zalogowany";
  122. header("Location: logowanie.php");
  123.  
  124.  
  125.  
  126. }
  127. ?>
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. </body>
  136.  
  137. </html>
  138. <center>Stworzone przez Arthesa, wszelkie prawa zastrzeżone.

Mam nadzieję, że ktoś pomoże.
Pozdrawiam ;>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 20:15