Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [html] wyrownanie w tabeli
grubas
post
Post #1





Grupa: Zarejestrowani
Postów: 28
Pomógł: 0
Dołączył: 28.11.2006

Ostrzeżenie: (0%)
-----


witam, mam problem z wyrownaniem do srodka w tabeli wyglada to tak :

(IMG:http://img218.imageshack.us/img218/2148/tabelkaaq0.th.jpg)



chcialbym zeby bylo worownane do srodka w kazdej komorce

  1. <?php
  2. echo ("<table border=1><tr><td valign=middle>");
  3.  
  4. echo ("<form action=wiadomix.php method=post />");
  5. echo ("<input type=hidden name=od value=$user_id />");
  6. echo ("<input type=hidden name=do value=$user_ide />");
  7. echo ("<input type=image src=gfx/wiadomixg.gif border=1 />");
  8. echo ("</form>");
  9.  
  10. echo ("</td><td>");
  11.  
  12. }
  13. ?>
Go to the top of the page
+Quote Post
maverickkk
post
Post #2





Grupa: Zarejestrowani
Postów: 181
Pomógł: 0
Dołączył: 12.11.2005

Ostrzeżenie: (0%)
-----


  1. <table border=1 height="100">
  2. <tr>
  3. <td valign=middle>asdasdasd</td>
  4. <td valign=middle>sd</td>
  5. </tr>


przy takim kodzie jest wysrodkowane. dalej ci sie tak robi (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) pokaz wiecej kodu

Ten post edytował maverickkk 12.02.2007, 12:02:51
Go to the top of the page
+Quote Post
grubas
post
Post #3





Grupa: Zarejestrowani
Postów: 28
Pomógł: 0
Dołączył: 28.11.2006

Ostrzeżenie: (0%)
-----


no wlasnie mam valign=middle i nadal to samo, normalny tekst wysrodkuje ale problem pojawia sie kiedy chce wysrokdowac formularz, tu cala duza tabelka :

  1. <?php
  2. echo ("<table class=tabka3 background=gfx/tlo3.gif border=0 cellspacing=0 cellpadding=4 width=95% height=250>");
  3. echo ("<tr align=center><td width=15% height=15% class=dolp background=gfx/tloc.gif><p>Autor</p></td><td width=85% class=dol background=gfx/tloc.gif><p>Tresc wiadomosci</p></td></tr>");
  4. echo ("<tr align=left><td width=15% hight=85% valign=middle class=dolp><div align=center> <table border=0 width=130 height=190><tr align=center><td height=25 width=100%><p>");
  5.  
  6. $sql66="select user_id from users where login="$autor_p"";
  7. $wynik66=mysql_query($sql66,$polaczenie) or die(mysql_error());
  8. $tobo=mysql_fetch_array($wynik66);
  9.  
  10. $user_ide=$tobo[user_id];
  11.  
  12. echo ("<a href=profil.php?user_id=$user_ide>$autor_p</a></p></td></tr><tr align=center><td width=100% height=130>");
  13.  
  14.  
  15. $czy_jest_okladka="./awatary/$autor_p.jpg";
  16.  
  17. if (file_exists($czy_jest_okladka)) {
  18.  
  19. echo(" <img src="./awatary/$autor_p.jpg" border=1 />");
  20.  
  21. } else echo ("");
  22.  
  23.  
  24. echo ("</td></tr><tr align=center><td height=25 width=100%><font class=tekst>Postow : </font><font size=2>$posty</font></td></tr></table></td><td width=85% height=85% valign=top class=dol><font class=post>");
  25.  
  26. echo ("<font class=tekst2>Data dodania posta : $data_p</font>"); 
  27.  
  28. if ($czy_w_admin=='1') {
  29.  
  30. echo ("<div align=right><a href=usun.php?akcja=usun_post&id_t=$id_t&unik=$unik>Usun Post</a></div>");
  31.  
  32. }
  33.  
  34.  
  35. $sql2="select sygnatura from users where login="$autor_p"";
  36. $wynik666=mysql_query($sql2,$polaczenie) or die(mysql_error());
  37. $tablica=mysql_fetch_array($wynik666);
  38.  
  39. $sygnatura=$tablica[sygnatura];
  40.  
  41. echo ("<hr color=#a3a19a><font class=post>"); echo emots ($tresc_p); echo ("</font>");
  42.  
  43.  
  44.  
  45. // czy edytowany
  46.  
  47. $sqlj="select login,data,ile from edit where login="$autor_p" and unik="$unik" and id_t="$id_t"";
  48. $wynikj=mysql_query($sqlj,$polaczenie) or die(mysql_error());
  49.  
  50. $tablicaj=mysql_fetch_array($wynikj);
  51.  
  52. if ($tablicaj[ile]!=FALSE) {
  53.  
  54. echo ("<br><br><font class=tekst2>Ostatnio zmieniony przez $tablicaj[login] : $tablicaj[data] , w sumie zmienia
    ny $tablicaj[ile] raz(y)</font><br>"
    );
  55.  
  56. }
  57.  
  58.  
  59. // czy edytowany koniec
  60.  
  61. if ($sygnatura!='') echo ("<br><font class=tekst>__________________________<br></font><font class=tekst2>$sygnatura</font>"); else echo ("&nbsp");
  62.  
  63. echo ("</td></tr>");
  64.  
  65.  
  66.  
  67.  
  68. echo ("<td class=bokp><center><font class=tekst> Rank : </font>");
  69.  
  70.  
  71. $sql6="select * from rank where numer<=$posty order by numer DESC";
  72. $wynik777=mysql_query($sql6,$polaczenie) or die(mysql_error());
  73.  
  74. $tab=mysql_fetch_array($wynik777);
  75.  
  76. echo $tab[rank];
  77.  
  78.  
  79. echo ("</center>");
  80.  
  81.  
  82. echo ("</td><td>");//<a href=wiadomix.php?od=$user_id&do=$user_ide>Wiadomix</a>");
  83.  
  84. echo ("<table border=1><tr><td valign=middle>");
  85.  
  86. echo ("<form action=wiadomix.php method=post />");
  87. echo ("<input type=hidden name=od value=$user_id />");
  88. echo ("<input type=hidden name=do value=$user_ide />");
  89. echo ("<input type=image src=gfx/wiadomixg.gif border=1 />");
  90. echo ("</form>");
  91.  
  92. echo ("</td><td>");
  93.  
  94. if ($tabka[lock]!='1') {
  95.  
  96. echo ("<form action=dodaj_p.php?id_t=$id_t method=post />");
  97. echo ("<input type=hidden name=cytat value="<table width=95% border=0><tr align=left><td><font class=zielony2>$autor_p napisal:</font></td><tr></table><table width=95% class=tabka_cytat background=gfx/tloc.gif><tr><td><font class=cytat>$tresc_p</font></td></tr></table><br>" />");
  98. echo ("<input type=image src=gfx/cytuj.gif />");
  99. echo ("</form>");
  100. echo ("</td>");
  101.  
  102. if ($wybrany==$autor_p) {
  103.  
  104. echo ("<td>");
  105. echo ("<form action=dodaj_p.php method=post />");
  106. echo ("<input type=hidden name=id_t value=$id_t />");
  107. echo ("<input type=hidden name=login value=$wybrany />");
  108. echo ("<input type=hidden name=unik value=$unik />");
  109. echo ("<input type=hidden name=edycja_start value="$tresc_p" />");
  110. echo ("<input type=image src=gfx/edytuj.gif />");
  111. echo ("</form>");
  112. echo ("</td>");
  113. }
  114.  
  115.  
  116.  
  117. } else {
  118.  
  119. if ($wybrany==$autor_p) {
  120.  
  121. echo ("<td>");
  122.  
  123. echo ("<form action=dodaj_p.php method=post />");
  124. echo ("<input type=hidden name=id_t value=$id_t />");
  125. echo ("<input type=hidden name=login value=$wybrany />");
  126. echo ("<input type=hidden name=unik value=$unik />");
  127. echo ("<input type=hidden name=edycja_start value="$tresc_p" />");
  128. echo ("<input type=image src=gfx/edytuj.gif />");
  129. echo ("</form>");
  130. echo ("</td>");
  131. }
  132. }
  133.  
  134. echo ("</tr></table>");
  135.  
  136. // koniec duzej
  137. echo ("</td></tr>");
  138. echo ("</table><br>");
  139.  
  140. }
  141. ?>



dobre by bylo tez jakby dalo sie zlikwidowac te puste wiersze pod formularzem, nie wiem skad one sie biora czy to formularz standardowo tworzy taki odstep ?

Ten post edytował grubas 12.02.2007, 12:15:17
Go to the top of the page
+Quote Post
Cienki1980
post
Post #4





Grupa: Przyjaciele php.pl
Postów: 1 590
Pomógł: 40
Dołączył: 11.01.2007
Skąd: Centrum

Ostrzeżenie: (0%)
-----


Żeby usunąć puste wiersze zmień kolejność zamykania znaczników.
Najpierw zamknij </td> a potem </form>
Go to the top of the page
+Quote Post
grubas
post
Post #5





Grupa: Zarejestrowani
Postów: 28
Pomógł: 0
Dołączył: 28.11.2006

Ostrzeżenie: (0%)
-----


Cytat(Cienki1980 @ 12.02.2007, 12:24:03 ) *
Żeby usunąć puste wiersze zmień kolejność zamykania znaczników.
Najpierw zamknij </td> a potem </form>



niestety bez efektu
Go to the top of the page
+Quote Post
Cienki1980
post
Post #6





Grupa: Przyjaciele php.pl
Postów: 1 590
Pomógł: 40
Dołączył: 11.01.2007
Skąd: Centrum

Ostrzeżenie: (0%)
-----


Dziwne ... u mnie to widać od razu różnicę .. np tutaj

A znacznik początkowe <form> dałeś przed <td> (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

  1. <?php
  2. echo "<form>";
  3. echo "<td>zawartosc komorki";
  4. echo "</td>";
  5. echo "</form>";
  6. ?>
Go to the top of the page
+Quote Post
maverickkk
post
Post #7





Grupa: Zarejestrowani
Postów: 181
Pomógł: 0
Dołączył: 12.11.2005

Ostrzeżenie: (0%)
-----


dobre by bylo tez jakby dalo sie zlikwidowac te puste wiersze pod formularzem, nie wiem skad one sie biora czy to formularz standardowo tworzy taki odstep ?

tak tworzy takie odstepy mozesz dodac do formualrza i pół formualrza style:

<form style="margin:0; padding:0; line-height:0;" (dalsza czesc kodu)
<input style="margin:0; padding:0; line-height:0;" (dalsza czesc kodu)

i odstepy powinny zniknąć.

Jak ci trzeba bedzie zrobic odstepy manipuluj wartosciami.
Go to the top of the page
+Quote Post
grubas
post
Post #8





Grupa: Zarejestrowani
Postów: 28
Pomógł: 0
Dołączył: 28.11.2006

Ostrzeżenie: (0%)
-----


dalem <form> przed <td> i pomoglo, style do <form> tez sie przydaly dzieki za pomoc (IMG:http://forum.php.pl/style_emoticons/default/snitch.gif)

ok moze spytam odrazu nie zakladajac nowego tematu, probuje zrobic cos co by pokazywalo kto jest aktualnie zalogowany tylko nie wiem jak to zrobic, moge przy otwieraniu sesji tworzyc plik o id usera albo wpisywac do bazy jego id tylko jak mam ogarnac kiedy on zamyka przegladarke bez wylogowywania sie ? czy moze wogole inaczej to dziala ?

Ten post edytował grubas 12.02.2007, 18:30:38
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 28.09.2025 - 16:37