Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [html][css]Problem z wyśrodkowaniem strony - CSS i div'y, Potrzebuję indywidualnej pomocy, z góry dzięki!
Pablo128
post
Post #1





Grupa: Zarejestrowani
Postów: 59
Pomógł: 2
Dołączył: 3.03.2008

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


Cytat
<div style="background-color: #FFFFFF; background-position: center; position:
absolute; left: 1px; top: 90px; width: 875px; height: 450px ; padding: 3px;
padding-right: 20px;">

Na powyższej zasadzie stworzyłem warstwy strony, która wyświetla się prawidłowo. Nie robiłem nic w CSS'ie. Wszystko w porządku poza tym, iż chciałbym żeby te warstwy były wyświetlane pośrodku ekranu. Analogicznie do nasza-klasa.pl

Z góry dzięki za pomoc
Pozdrawiam
Powód edycji: dodałem tagi (cysiaczek)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Pablo128
post
Post #2





Grupa: Zarejestrowani
Postów: 59
Pomógł: 2
Dołączył: 3.03.2008

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


Udało mi się zdziałać coś takiego:

index.html
  1. <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2">
  2. </head>
  3. <link rel="stylesheet" href="styl.css" type="text/css">
  4. <div class=naglowek>
  5. </div>
  6. <div id=tlo>
  7.  
  8. <div class=nawigacja>
  9. nawigacja
  10. </div>
  11.  
  12. <div class=tresc>
  13.  
  14. treść
  15.  
  16. </div>
  17. </div>
  18. <div class=stopka> Stopka </div>
  19. </body>
  20. </html>


styl.css
  1. body {
  2. background-image:url(grafika/tlo.gif);
  3. text-align: left;
  4. padding: 0;
  5. margin: 0;
  6. font-family: Tahoma, sans-serif;
  7. color: #3b3b3b;
  8. }
  9.  
  10. .naglowek {
  11. background-image:url(grafika/naglowek.gif);
  12. margin:0 auto;
  13. position: relative;
  14. left: 0px;
  15. top: 105px;
  16. width: 875px;
  17. height: 80px;
  18. padding: 3px;
  19. padding-right: 20px;
  20. }
  21.  
  22. #tlo {
  23. background-color: #FFFFFF;
  24. position: relative;
  25. margin:0 auto;
  26. left: 0px;
  27. top: 105px;
  28. width: 874px;
  29. height: 250px auto !important;
  30. padding: 3px;
  31. padding-right: 20px;
  32. }
  33.  
  34.  
  35. .tresc {
  36. background-color: #FFFFFF;
  37. position: relative;
  38. margin:0 auto;
  39. left: 110px;
  40. top: -160px;
  41. width: 660px;
  42. height: 450px auto !important;
  43. }
  44.  
  45. .nawigacja {
  46. background-color: #B4D66C;
  47. position: relative;
  48. margin:0 auto;
  49. left: -332px;
  50. top: -19px;
  51. width: 215px;
  52. height: 200px auto !important;
  53. }
  54.  
  55. .stopka {
  56. background-image:url(grafika/stopka.gif);
  57. margin:0 auto;
  58. position: relative;
  59. left: 0px;
  60. top: 105px;
  61. width: 875px;
  62. height: 30px;
  63. padding: 3px;
  64. padding-right: 20px;
  65. }





Wszystko w porządku w firefoxie, niestety w IE totalna masakra. Proszę o pomoc.

Proszę o przetestowanie kodu i poprawienie. Z góry dzięki!
Go to the top of the page
+Quote Post

Posty w temacie


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: 27.12.2025 - 11:03