Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][CSS]table w div
Ziom73
post
Post #1





Grupa: Zarejestrowani
Postów: 140
Pomógł: 1
Dołączył: 8.04.2009
Skąd: Polanica Zdrój | Poznań | Wrocław

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


Mam news:
  1. <?php
  2. <table bgcolor="#C0C0C0" width="700">
  3. <tr>
  4.    <td><font color="maroon"><h1><p style="font-family: fantasy"><span style='background-color:#EEEEEE;padding:2px'>Wielkie otwarcie!</span></p></h1></font></td>
  5. </tr>
  6. </table>
  7. <table bgcolor="#C0C0C0" width="700" height="200" >
  8. <tr>
  9. <td>
  10. <p style="font-family: arial">
  11. tu jest treść
  12. </p>
  13. </td>
  14. </tr>
  15. </table>
  16. ?>

Ale w div nie działa, ponieważ wywala pod div ;/
Jak to naprawić, lub inaczej zrobić?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
InosU31
post
Post #2





Grupa: Zarejestrowani
Postów: 221
Pomógł: 14
Dołączył: 11.03.2009
Skąd: Lubaczów

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


nie wiem czy o to Ci chodzilo ale przerobilem to troche:
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/htm14/loose.dtd">
  3. <link rel="stylesheet" href="style.css" type="text/css" />
  4. </head>
  5.  
  6. <div id="newst-bg">aaaa
  7. <div id="newst">logo
  8.  
  9. </div>
  10. <div id="news-bg">bok
  11. </div>
  12. <div id="news">
  13. <table bgcolor="#C0C0C0" width="700">
  14. <tr>
  15. <td><font color="maroon"><h1><p style="font-family: fantasy"><span style='background-color:#EEEEEE;padding:2px'>Wielkie otwarcie!</span></p></h1></font></td>
  16. </tr>
  17. <table bgcolor="#C0C0C0" width="700" height="200" >
  18. <tr>
  19. <td>
  20. <p style="font-family: arial">
  21. tu jest treść
  22. </p>
  23. </td>
  24. </tr>
  25. </div>
  26. </div>
  27. <div id="stopka-bg">ddd
  28. <div id="stopka">
  29. <img src="images/stopka.png" />
  30. </div>
  31. </div>
  32.  
  33.  
  34. <br /><br /><br /><br />
  35. </body>
  36. </html>


plik style.css:
  1. #newst-bg {border:1px solid yellow; overflow:auto; width:900px; height:auto; background-repeat: no-repeat; right top}
  2. #newst {border:1px solid green; float:left; width:890px; height:50px;}
  3. #news-bg {border:1px solid yellow; float:left; width:100px; height:300px; background-image: url(images/bg-s.png); background-repeat: repeat-y}
  4. #news {border:1px solid black; float: left; bottom:20px; padding: 20px 0px; margin-left:50px;}
  5. #stopka-bg {border:1px solid red; position:relative; width:900px; height:100; margin-top:10px; margin-left:auto; margin-right:auto}
  6. #stopka {border:1px solid black; float: right; width: auto; height:auto; }


nie moge wyswietlic jak to u mnie wyglada to co dales bo nie wiem jak zrobic zrzut ekranu a tym laptopie ale zrob sobie dwa pliki jeden index.html i drugi style.css i wklej te zawartosci i zobaczysz co tam zrobilem bo nie wiem czy o to ci chodzilo.


pozdrawiam

ps. u mnie to wyswietla jakos dziwnie ta tabelke ale w divach nie pod:|
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 - 10:37