Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS][HTML]Linia w tabeli
czernin
post
Post #1





Grupa: Zarejestrowani
Postów: 62
Pomógł: 0
Dołączył: 14.06.2012

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


Witam,

Mam taki kod:

  1. <div class="strona">
  2. <table width="800px">
  3. <tr>
  4. <td width="30%">Admin<br /><div class="maly">09/10/2012 19:32:08</td>
  5. <td width="70%">1</td>
  6. </tr>
  7.  
  8. <tr><td><hr /></td></tr>
  9.  
  10. <tr>
  11. <td width="30%">Admin<br /><div class="maly">09/10/2012 19:32:08</td>
  12. <td width="70%">2</td>
  13. </tr>
  14.  
  15. <tr><td><hr /></td></tr>
  16.  
  17. <tr>
  18. <td width="30%">Admin<br /><div class="maly">09/10/2012 19:32:08</td>
  19. <td width="70%">3</td>
  20. </tr>
  21.  
  22. <tr><td><hr /></td></tr>
  23.  
  24. <tr>
  25. <td width="30%">Admin<br /><div class="maly">09/10/2012 19:32:08</td>
  26. <td width="70%">4</td>
  27. </tr>
  28. </div>



Style:

  1. .strona {
  2. width: 800px;
  3. margin: 0px auto;
  4. }
  5.  
  6. hr {
  7. border: none 0;
  8. border-top: 1px solid #CECECE;
  9. height: 1px;
  10. }
  11.  
  12. .maly {
  13. font-size:10px
  14. }


W rezultacie otrzymuję:



Jak zrobić, aby w efekcie powstało coś takiego?

Go to the top of the page
+Quote Post
CuteOne
post
Post #2





Grupa: Zarejestrowani
Postów: 2 958
Pomógł: 574
Dołączył: 23.09.2008
Skąd: wiesz, że tu jestem?

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


http://jsfiddle.net/ED2m7/
Go to the top of the page
+Quote Post
czernin
post
Post #3





Grupa: Zarejestrowani
Postów: 62
Pomógł: 0
Dołączył: 14.06.2012

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


Dziwna sprawa - nie chce działać..
Go to the top of the page
+Quote Post
kokers
post
Post #4





Grupa: Zarejestrowani
Postów: 154
Pomógł: 33
Dołączył: 18.10.2010
Skąd: Katowice

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


Co to znaczy: "nie chce działać"?

Zauważ, że CuteOne dla dolnej linii nie wykorzystuje <hr/>, ale bez tego jak teraz wygląda Twój kod i jak nie chce działać, to można sobie gdybać.


--------------------
‎"Sometimes you're gonna get odd error syntax, unexpected T_PAAMAYIM_NEKUDOTAYIM and you're like, what in the world is that thing i have no idea what went wrong in my code. In english that error means you screwed up the references to an object" Kevin Skoglund
Drobna prywata: Ależ nie nie, nie zamierzam zmieniać płci w najbliższym czasie, więc zwracanie się do mnie per Pan jest odrobinkę nietrafione.
Go to the top of the page
+Quote Post
czernin
post
Post #5





Grupa: Zarejestrowani
Postów: 62
Pomógł: 0
Dołączył: 14.06.2012

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


  1. <style type="text/css">
  2. .strona {
  3. width: 800px;
  4. margin: 0px auto;
  5. }
  6.  
  7. tr {
  8. border-bottom: 1px solid #000;
  9. }
  10.  
  11. .maly {
  12. font-size:10px
  13. }?
  14. </head>
  15. <div class="strona">
  16. <table width="800px">
  17. <tr>
  18. <td width="30%">Admin<br /><div class="maly">09/10/2012 19:32:08</div></td>
  19. <td width="70%">1</td>
  20. </tr>
  21.  
  22. <tr>
  23. <td width="30%">Admin<br /><div class="maly">09/10/2012 19:32:08</div></td>
  24. <td width="70%">2</td>
  25. </tr>
  26.  
  27. <tr>
  28. <td width="30%">Admin<br /><div class="maly">09/10/2012 19:32:08</div></td>
  29. <td width="70%">3</td>
  30. </tr>
  31.  
  32. <tr>
  33. <td width="30%">Admin<br /><div class="maly">09/10/2012 19:32:08</div></td>
  34. <td width="70%">4</td>
  35. </tr>
  36. </div>
  37. </html>


Ten post edytował czernin 13.10.2012, 14:01:51
Go to the top of the page
+Quote Post
kokers
post
Post #6





Grupa: Zarejestrowani
Postów: 154
Pomógł: 33
Dołączył: 18.10.2010
Skąd: Katowice

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


I co nie działa?

To jest ten sam kod co podał CuteOne. W jsfiddle widać, że działa. więc co nie działa? być może inne własności np dla table lub tr dodatkowo ci mieszają.

tudzież, dodanie tego:

  1. table {
  2. border-collapse: collapse;
  3. }


rozwiąże sprawę.

Ten post edytował kokers 13.10.2012, 14:08:43


--------------------
‎"Sometimes you're gonna get odd error syntax, unexpected T_PAAMAYIM_NEKUDOTAYIM and you're like, what in the world is that thing i have no idea what went wrong in my code. In english that error means you screwed up the references to an object" Kevin Skoglund
Drobna prywata: Ależ nie nie, nie zamierzam zmieniać płci w najbliższym czasie, więc zwracanie się do mnie per Pan jest odrobinkę nietrafione.
Go to the top of the page
+Quote Post
czernin
post
Post #7





Grupa: Zarejestrowani
Postów: 62
Pomógł: 0
Dołączył: 14.06.2012

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


Działa, dzięki. Chodziło o to, że nie wyświetlała się linia, mimo tego, że w jsfiddle wszystko wyglądało ok.
Go to the top of the page
+Quote Post

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: 21.08.2025 - 09:50