Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Jak wyśrodkować stronę
Forum PHP.pl > Forum > Przedszkole
Tom_007
Witam, pociąłem layout do divów w PS ale nie mogę go wyśrodkować i ciągle strona jest po lewej stronie, poniżej załączam kod - pomógłby ktoś to zrobić?
  1. <title>tytuł</title>
  2. <meta http-equiv="Content-Type" content="text/html; charset=windows-1250" />
  3. <style type="text/css">
  4. <!--
  5.  
  6.  
  7. div.Table_01 {
  8. position:absolute;
  9. left:0px;
  10. top:0px;
  11. width:608px;
  12. height:608px;
  13. }
  14.  
  15. div.id01 {
  16. position:absolute;
  17. left:0px;
  18. top:0px;
  19. width:608px;
  20. height:7px;
  21. }
  22.  
  23. div.id02 {
  24. position:absolute;
  25. left:0px;
  26. top:7px;
  27. width:33px;
  28. height:601px;
  29. }
  30.  
  31. div.id03 {
  32. position:absolute;
  33. left:33px;
  34. top:7px;
  35. width:271px;
  36. height:100px;
  37. }
  38.  
  39. div.id04 {
  40. position:absolute;
  41. left:304px;
  42. top:7px;
  43. width:271px;
  44. height:100px;
  45. }
  46.  
  47. div.id05 {
  48. position:absolute;
  49. left:575px;
  50. top:7px;
  51. width:33px;
  52. height:601px;
  53. }
  54.  
  55. div.id06 {
  56. position:absolute;
  57. left:33px;
  58. top:107px;
  59. width:542px;
  60. height:4px;
  61. }
  62.  
  63. div.id07 {
  64. position:absolute;
  65. left:33px;
  66. top:111px;
  67. width:22px;
  68. height:24px;
  69. }
  70.  
  71. div.id08 {
  72. position:absolute;
  73. left:55px;
  74. top:111px;
  75. width:83px;
  76. height:24px;
  77. }
  78.  
  79. div.id09 {
  80. position:absolute;
  81. left:138px;
  82. top:111px;
  83. width:83px;
  84. height:24px;
  85. }
  86.  
  87. div.id10 {
  88. position:absolute;
  89. left:221px;
  90. top:111px;
  91. width:83px;
  92. height:24px;
  93. }
  94.  
  95. div.id11 {
  96. position:absolute;
  97. left:304px;
  98. top:111px;
  99. width:83px;
  100. height:24px;
  101. }
  102.  
  103. div.id12 {
  104. position:absolute;
  105. left:387px;
  106. top:111px;
  107. width:83px;
  108. height:24px;
  109. }
  110.  
  111. div.id13 {
  112. position:absolute;
  113. left:470px;
  114. top:111px;
  115. width:83px;
  116. height:24px;
  117. }
  118.  
  119. div.id14 {
  120. position:absolute;
  121. left:553px;
  122. top:111px;
  123. width:22px;
  124. height:24px;
  125. }
  126.  
  127. div.id15 {
  128. position:absolute;
  129. left:33px;
  130. top:135px;
  131. width:271px;
  132. height:191px;
  133. }
  134.  
  135. div.id16 {
  136. position:absolute;
  137. left:304px;
  138. top:135px;
  139. width:271px;
  140. height:191px;
  141. }
  142.  
  143. div.id17 {
  144. position:absolute;
  145. left:33px;
  146. top:326px;
  147. width:271px;
  148. height:192px;
  149. }
  150.  
  151. div.id18 {
  152. position:absolute;
  153. left:304px;
  154. top:326px;
  155. width:271px;
  156. height:192px;
  157. }
  158.  
  159. div.id19 {
  160. position:absolute;
  161. left:33px;
  162. top:518px;
  163. width:542px;
  164. height:90px;
  165. }
  166.  
  167. -->
  168. </head>
  169. <body style="background-color:#000;">
  170.  
  171. <div class="Table_01">
  172. <div class="id01">
  173. <img src="images/01.gif" width=608 height=7 />
  174. </div>
  175. <div class="id02">
  176. <img src="images/02.gif" width=33 height=601 />
  177. </div>
  178. <div class="id03">
  179. <img src="images/03.gif" width=271 height=100 />
  180. </div>
  181. <div class="id04">
  182. <img src="images/04.gif" width=271 height=100 />
  183. </div>
  184. <div class="id05">
  185. <img src="images/05.gif" width=33 height=601 />
  186. </div>
  187. <div class="id06">
  188. <img src="images/06.gif" width=542 height=4 />
  189. </div>
  190. <div class="id07">
  191. <img src="images/07.gif" width=22 height=24 />
  192. </div>
  193. <div class="id08">
  194. <a href="index.html"><img src="images/08.gif" width=83 height=24 border="0"/></a>
  195. </div>
  196. <div class="id09">
  197. <a href="forum.html"><img src="images/09.gif" width=83 height=24 border="0" /></a>
  198. </div>
  199. <div class="id10">
  200. <a href="pictrues.html"><img src="images/10.gif" width=83 height=24 border="0" /></a>
  201. </div>
  202. <div class="id11">
  203. <a href="video.html"><img src="images/11.gif" width=83 height=24 border="0" /></a>
  204. </div>
  205. <div class="id12">
  206. <a href="riders.html"><img src="images/12.gif" width=83 height=24 border="0" /></a>
  207. </div>
  208. <div class="id13">
  209. <a href="links.html"><img src="images/13.gif" width=83 height=24 border="0" /></a>
  210. </div>
  211. <div class="id14">
  212. <img src="images/14.gif" width=22 height=24 />
  213. </div>
  214. <div class="id15">
  215. <img src="images/15.gif" width=271 height=191 />
  216. </div>
  217. <div class="id16">
  218. <img src="images/16.gif" width=271 height=191 />
  219. </div>
  220. <div class="id17">
  221. <img src="images/17.gif" width=271 height=192 />
  222. </div>
  223. <div class="id18">
  224. <img src="images/18.gif" width=271 height=192 />
  225. </div>
  226. <div class="id19">
  227. <img src="images/19.gif" width=542 height=90 />
  228. </div>
  229. </div>
  230. </body>
  231. </html>
l0ud
Niestety, ale jest to pozycjonowanie absolutne, po prostu źle pocięty layout. Z przyczyn technicznych nie możesz tego wyśrodkować - naucz się podstaw html'a i css'a i zrób to ręcznie... Więcej poradzić nie mogę sad.gif
Maciekbjw
Oczywiście, że możesz wyśrodkować tą stronę.

Może kod nie jest poprawny, bo tak się teraz stron nie robi, ale zmień tą linijke na
Kod
div.Table_01 {
    position:relativ;
margin: auto;
    width:608px;
    height:608px;
}


Ustal odpowiedni width i height i ma działać.
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.