Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [CSS] Problem z tabelą.
Forum PHP.pl > Forum > Po stronie przeglądarki > CSS
klumok
  1. *
  2. {
  3. border: 0;
  4. margin: 0;
  5. padding: 0;
  6. }
  7.  
  8.  
  9.  
  10. table
  11. {
  12. text-align: left;
  13. border-spacing: 0px;
  14. border: 1px solid #aeb3b6;
  15. border-collapse: collapse;
  16. text-align: center;
  17.  
  18. }
  19.  
  20. table .od , tr .od, td .od {
  21. color: #FFFFFF;
  22. background-color: #FFFFFF;
  23.  
  24.  
  25. }
  26.  
  27. input {
  28. color: #55595C;
  29. text-align: center;
  30. font-family: Arial,Helvetica,sans-serif;
  31. border: solid 1px #989898;
  32.  
  33.  
  34. }
  35.  
  36. input.odd {
  37. color: #339933;
  38. text-align: center;
  39. font-family: Arial,Helvetica,sans-serif;
  40. border: solid 1px #989898;
  41.  
  42. }
  43. table a, table, tbody, tfoot, tr, th, td {
  44. color: #55595C;
  45. font-family: Arial,Helvetica,sans-serif;
  46. font-size: 13px;
  47. line-height: 2em;
  48.  
  49.  
  50. }
  51. tbody td{
  52. line-height: 2.5em;
  53. text-align: center;
  54. }
  55.  
  56. table caption
  57. {
  58. padding: .4em 0 ;
  59. font-size: 240%;
  60. font-style: normal;
  61. color: #FB7E00;
  62. }
  63.  
  64. table a
  65. {
  66. display: block;
  67. text-decoration: none;
  68. color: #FF8E53;
  69. padding-right: 1.5em;
  70.  
  71. }
  72.  
  73. table a:hover, table a:focus
  74. {
  75. text-decoration: underline;
  76. }
  77.  
  78. table th a
  79. {
  80. color: #FF8E53;
  81. text-align: right;
  82. }
  83. table .odd th a,table .odd td a,table .odd td{
  84. color: #666;
  85. padding-right: 1.0 em;
  86. }
  87.  
  88. table th a:hover, table th a:focus, tbody tr:hover th
  89. {
  90.  
  91. background-color: #FFCC99;
  92. color: #fff !important;
  93. }
  94. table .odd th,table .odd td{
  95. background-color: #DDDDDD;
  96. }
  97.  
  98.  
  99. tfoot{
  100. background-image: url(verlauf_schwarz.gif);
  101. border-top: 1px solid #fff;
  102.  
  103.  
  104. }
  105. tfoot th,tfoot td{
  106. color: #fff;
  107. }
  108.  
  109. tbody th
  110. {
  111. padding-right: 1.0em;
  112. color: #25c1e2;
  113. font-style: normal;
  114. background-color: #fff;
  115. border-bottom: 1px dotted #aeb3b6;
  116. }
  117.  
  118. td
  119. {
  120. color: #339933;
  121. border-bottom: 1px dotted #aeb3b6;
  122. border-left: 1px dotted #aeb3b6;
  123. border-right: 1px dotted #aeb3b6;
  124. text-align: center;
  125. padding-right: 0.5em;
  126.  
  127. }
  128.  
  129. thead th {
  130. background-image: url("http://www.ad-plus.de/table/verlauf_schwarz.gif");
  131. color: #FFFFFF;
  132. font-weight: normal;
  133. letter-spacing: 1px;
  134. text-transform: uppercase;
  135. }
  136.  
  137. tbody tr.odd
  138. {
  139. border-bottom: 1px dotted #aeb3b6;
  140. }
  141.  
  142. tbody tr:hover td
  143. {
  144. background-color: #339933;
  145. }
  146.  
  147. tbody tr:hover td,tbody tr:hover th, tbody tr:hover a
  148. {
  149. color: #fff !important;
  150. }



Potrzebuje aby to zadziałało tylko dla tabeli o id tabela, lub dla tabeli o klasie tabela.

Mi to obojętne, chce aby ten css nie dotyczył innych tabeli na stronie, nie mogę sobie z tym poradzić.


Sephirus
Daj przy każdej deklaracji "table.tabela" (tam gdzie jest table dopisz tylko .tabela) jeśli chcesz używać klas lub
table#tabela - dla ID

Potem żądaną tabelę wyposaż w odpowiednie ID/CLASS wink.gif

HTH! wink.gif
klumok
To wiedziałem tongue.gif Ale mimo to nie chciało działać, sam sobie napisałem css'a, wzorując się na wyglądzie tego. Wszystko już działa.

Nie lubię pracować na czyiś biggrin.gif
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.