Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][CSS]Przesunięcie tekstu
Mefiuu
post
Post #1





Grupa: Zarejestrowani
Postów: 371
Pomógł: 18
Dołączył: 23.11.2008

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


Witam. Mam taki problem. Otóż chciałbym przesunąć tekst w danym divie tak, aby zaczynał się np. 20px od lewej i 100 px od góry. Mam taki kod:

index.php
Kod
<div id="tresc">
TREŚĆ
</div>


a tu style.css:
Kod
#tresc {

    width: 900px;
    height: auto;
        background: url(images/news.png);
    overflow: hidden;
    float: left;

}


nie wiem jaką komendę dodać aby przesunąć w prawo cały tekst i trochę do dołu. Sprawdzałem margin-left i top , oraz padding ale one przesuwają wszystko.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Mefiuu
post
Post #2





Grupa: Zarejestrowani
Postów: 371
Pomógł: 18
Dołączył: 23.11.2008

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


  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="pl" xml:lang="pl">
  4. <title>Samochody używane</title>
  5. <meta http-equiv="content-type" content="text/html; charset=iso-8859-2" />
  6. <meta name ="description" content="Samochody używane" />
  7. <meta name="keywords" content="samochody, auta, używane" />
  8. <meta http-equiv="content-language" content="pl" />
  9. <meta name="author" content="Mefiuu & Raf199" />
  10. <meta name="generator" content="Notatnik SP" />
  11. <link rel="Stylesheet" type="text/css" href="style.css" />
  12. </head>
  13.  
  14.  
  15. <div id="dokument">
  16. <div id="logo">
  17. LOGO
  18. </div>
  19. <div id="podlogo">
  20. PODLOGO
  21. </div>
  22. <div id="menu">
  23. MENU
  24. </div>
  25. <div id="bokmenu">
  26. BOK MENU
  27. </div>
  28. <div id="tytul">
  29.  
  30. <div id="tytul_inner">
  31.  
  32. STRONA GŁÓWNA
  33. </div>
  34.  
  35. </div>
  36. <div id="tresc">
  37. <p>TREŚĆ</p>
  38. </div>
  39. <div id="stopka">
  40. STOPKA
  41. </div>
  42.  
  43. </div>
  44. </body>
  45. </html>
  46.  


  1. body {
  2. background:#ffffbb url('grafika/bg.png') repeat-x scroll top left;
  3. margin:0;
  4. padding:0;
  5. padding-top:30px;
  6. font-family:Arial, Helvetica, sans-serif;
  7. }
  8.  
  9.  
  10.  
  11. #dokument {
  12.  
  13. width: 900px;
  14. height: auto;
  15. margin: auto;
  16.  
  17.  
  18. }
  19.  
  20. #logo {
  21.  
  22. width: 900px;
  23. height: 183px;
  24. background: url(images/logo.png);
  25. float: left;
  26. text-indent: -2000000px;
  27. overflow: hidden;
  28.  
  29. }
  30.  
  31. #podlogo {
  32. width: 900px;
  33. height: 44px;
  34. background: url(images/podlogo.png);
  35. float: left;
  36. text-indent: -2000000px;
  37. overflow: hidden;
  38. }
  39.  
  40. #menu {
  41.  
  42. width: 700px;
  43. height: 79px;
  44. float: left;
  45. background: url(images/menu.png) repeat;
  46. text-indent: 20px;
  47.  
  48. }
  49.  
  50. #bokmenu {
  51.  
  52. height: 79px;
  53. width: 200px;
  54. float: right;
  55. background: url(images/bokmenu.png);
  56. text-indent: -2000000px;
  57. }
  58.  
  59. #tytul {
  60. width: 900px;
  61. height: 135px;
  62. background: url(images/tytul.png);
  63. clear: both;
  64.  
  65. }
  66.  
  67. #tytul_inner {
  68. margin-left: 20px;
  69. margin-top: 150px;
  70. }
  71.  
  72.  
  73. #tresc {
  74.  
  75. width: 900px;
  76. height: auto;
  77. background: url(images/news.png);
  78. overflow: hidden;
  79. float: left;
  80. text-indent: 30px;
  81.  
  82. }
  83.  
  84.  
  85.  
  86.  
  87. #stopka {
  88.  
  89. width: 900px;
  90. height: 25px;
  91. background: url(images/stopka.png);
  92. clear: both;
  93. text-indent: -2000000px;
  94.  
  95.  
  96.  
  97. }
  98.  


mniej więcej, a raczej dokładnie tak.
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: 5.04.2026 - 16:00