Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Sklepanie dwóch CSS w jeden
Forum PHP.pl > Forum > Po stronie przeglądarki > CSS
kamilosxd678
Witam! Mam mały problem ze skryptem. Teoretycznie wszystko cacy ale muszę sklepać 2 style ze sobą a nie wiem za bardzo jak wykryć co się gryzie :/ gdy korzystam z podstawowego stylu to strona wygląda tak jak chcę, jednak nie działa javascript, a gdy sklepie 2 cssy w jeden to skrypt działa, ale za to strona się psuje :/


css1 (znaleziony w necie, przerobiony przeze mnie)
  1. body
  2. {
  3. color: #423f46;
  4. background: #423f46 url(images/back.jpg) no-repeat center top;
  5. font-size: 12px;
  6. font-family: Geneva, Arial, Helvetica, Tahoma;
  7. line-height: 150%;
  8. }
  9.  
  10. html
  11. {
  12. height: 100%!important;
  13. }
  14.  
  15. html,body
  16. {
  17. margin: 0;
  18. padding: 0;
  19. }
  20.  
  21.  
  22. /* Global styles */
  23.  
  24.  
  25. a
  26. {
  27. color: #323345;
  28. text-decoration: none;
  29. }
  30.  
  31. a:hover, a:active, a:focus
  32. {
  33. color: #ddddf5;
  34. }
  35.  
  36. .button
  37. {
  38. color: #333;
  39. font-weight: bold;
  40. background: url(images/button-back.png) repeat;
  41. border: 1px solid #555;
  42. padding: 2px;
  43. margin-top: 5px;
  44. margin-bottom: 5px;
  45. }
  46.  
  47. .inputbox
  48. {
  49. background: url(images/input-back.png) repeat;
  50. border: 1px solid #555;
  51. padding: 3px 0 3px 5px;
  52. margin-top: 5px;
  53. }
  54.  
  55. .clearfix:after
  56. {
  57. clear: both;
  58. display: block;
  59. content: "#";
  60. height: 0;
  61. visibility: hidden;
  62. }
  63.  
  64.  
  65. /* /Global styles */
  66. /* Wrapper styles */
  67.  
  68.  
  69. #pagewrap
  70. {
  71. width: 980px;
  72. margin: 0 auto;
  73. }
  74.  
  75. #flashwrap
  76. {
  77. background: top center;
  78. height: 385px;
  79. margin-left: 15px;
  80. }
  81.  
  82. #mainwrap
  83. {
  84. float: right;
  85. margin-top: -85px;
  86. width: 750px;
  87. }
  88.  
  89. #contentwrap-top
  90. {
  91. background: url(images/wrap-top.png) no-repeat center top;
  92. position: relative;
  93. height: 106px;
  94. }
  95.  
  96. #contentwrap-center
  97. {
  98. background: url(images/wrap-center.png) repeat-y center top;
  99. min-height: 810px;
  100. }
  101.  
  102. #status
  103. {
  104. float: right;
  105. margin-top: -2px;
  106. margin-right: 30px;
  107. }
  108.  
  109. #contentwrap
  110. {
  111. margin-left: 30px;
  112. margin-right: 30px;
  113. font-size: 14px;
  114.  
  115. }
  116. #contentwrap h3
  117. {
  118. text-align: center;
  119. }
  120. #contentwrap a
  121. {
  122. color: #444488;
  123. }
  124. #contentwrap a:hover
  125. {
  126. color: #6666DD;
  127. }
  128.  
  129. #contentwrap-bottom
  130. {
  131. background: url(images/wrap-bottom.png) no-repeat center bottom;
  132. height: 106px;
  133. line-height: normal;
  134. }
  135.  
  136. #menuwrap
  137. {
  138. float: right;
  139. margin-top: 45px;
  140. width: 230px;
  141. overflow: hidden;
  142. color: #000;
  143. }
  144.  
  145. #menupad
  146. {
  147. padding: 0 10px 10px 0;
  148. }
  149.  
  150. #menuwrap a
  151. {
  152. font-size: 12px;
  153. padding-left: 15px;
  154. }
  155.  
  156. #menuwrap a.nostyle
  157. {
  158. font-size: 12px;
  159. padding-left: 0px;
  160. }
  161.  
  162. #menuwrap form
  163. {
  164. padding-left: 20px;
  165. }
  166.  
  167. #menuwrap a.menulink
  168. {
  169. border-bottom: 1px dotted #666;
  170. display: block;
  171. background: url(images/bullet.png) no-repeat left;
  172. margin-left: 45px;
  173. font-size: 13px;
  174. font-weight: bold;
  175. padding-left: 18px;
  176. }
  177.  
  178. #menuwrap a.menulink:hover
  179. {
  180. background: url(images/bullet-hover.png) no-repeat left;
  181. }
  182.  
  183. #menumodule
  184. {
  185. padding:0 0 12px;
  186. }
  187. #menumodule h3
  188. {
  189. font-size: 16px;
  190. font-weight: bold;
  191. text-align: center;
  192. color: #bbc0c4;
  193. background: url(images/title-back.png) no-repeat top left;
  194. width: 100%;
  195. margin: 0;
  196. padding: 8px 15px 15px;
  197. }
  198.  
  199. #footerwrap
  200. {
  201. width: 78%;
  202. float: right;
  203. position: relative;
  204. color: #F7F7F7;
  205. }
  206.  
  207.  
  208. /* /Wrapper styles */

css2
  1. #lightbox{ position: absolute; left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0;}
  2. #lightbox img{ width: auto; height: auto;}
  3. #lightbox a img{ border: none; }
  4.  
  5. #outerImageContainer{ position: relative; background-color: #fff; width: 250px; height: 250px; margin: 0 auto; }
  6. #imageContainer{ padding: 10px; }
  7.  
  8. #loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; }
  9. #hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; }
  10. #imageContainer>#hoverNav{ left: 0;}
  11. #hoverNav a{ outline: none;}
  12.  
  13. #prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; }
  14. #prevLink { left: 0; float: left;}
  15. #nextLink { right: 0; float: right;}
  16. #prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
  17. #nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }
  18.  
  19. #imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; overflow: auto; width: 100% ; }
  20.  
  21. #imageData{ padding:0 10px; color: #666; }
  22. #imageData #imageDetails{ width: 70%; float: left; text-align: left; }
  23. #imageData #caption{ font-weight: bold; }
  24. #imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
  25. #imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; outline: none;}
  26.  
  27. #overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; }

Proszę o pomoc

P.S.: Jest jakiś program do tworzenia stylów css z debugerem? ^^
thek
Użyj Firebuga smile.gif On Ci pokazuje jaki styl ma dany element, z jakiego css pochodzi i ewentualnie która własność jest "nadpisana" inną. Myślę, że pod tym względem FB jest przydatny. A odkryjesz jego zastosowanie nie tylko do tego i już Ci się zupełnie spodoba jego użytkowanie.
baa
Nie masz tego dużo, to wklejaj CSS#2 po jednej lub kilka linijek i będziesz widział w którym miejscu pojawia się problem.

A Firebuga i tak zainstaluj. winksmiley.jpg
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.