Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]wysrodkowanie diva
upeertv
post
Post #1





Grupa: Zarejestrowani
Postów: 111
Pomógł: 0
Dołączył: 5.01.2013

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


witam mam pewien problem, otoz napisalem na szybko taki kod, jest on pomieszany i nie zooptymalizowany ale tym sie zajme pozniej

  1. <div class="1_div" style="position: fixed;">
  2. <div id="gbelka">
  3.  
  4. <div class="2_div" style="padding; 0px 0px 0px 0px;">
  5. <table border="0">
  6. <tr><td>
  7. <div id="head">
  8. <!-- ============================ TESTOWA WYSZUKIWARKA -->
  9. <img src="testowe/WYSZUKIWARKA.png" style="margin-left: 120%;" height="30">
  10. <!-- ============================ KONIEC TESTOWA WYSZUKIWARKA -->
  11. </div>
  12. </td><td>
  13. <div id="menu_logo">
  14. <?php
  15. include ('pages/glowna/menu_logo.php');
  16. ?>
  17.  
  18. </div>
  19. </td></tr>
  20. </table>
  21.  
  22. </div>
  23. </div>
  24.  
  25. </div>



chcialbym wiedziec jak mam wysrodkowac czesc z diva 2_div tak by cala jego część pojawila sie na srodku strony czyli logo wyszukiwarka i zakładki ohno-smiley.gif

css:

  1. .1_div{
  2. position: absolute;
  3. left: 0;
  4. top: 0;
  5. background-repeat: repeat-x;
  6. }
  7.  
  8. .2_div{
  9. left: 0;
  10. top: 0;
  11. background-repeat: repeat-x;
  12. background: transparent url(img/logo_belka.png) repeat-x;
  13. }
  14.  
  15. #gbelka {
  16. height: 38px;
  17. width: 100000px;
  18. background: transparent url(img/logo_belka.png) repeat-x;
  19. background-repeat: repeat-x;
  20. background-position: left;
  21. float: center;
  22. text-align: center;
  23. position: relative; z-index: 1;
  24. }
  25.  
  26.  
  27. #head {
  28. height: 30px;
  29. width: 140px;
  30. background: transparent url(img/upeer_music.png) no-repeat;
  31. background-position: left;
  32. float: center;
  33. text-align: center;
  34. margin-left: 2%;
  35. position: relative; z-index: 2;
  36. }
  37.  
  38.  
  39. #menu_logo {
  40. margin-left: 400px;
  41. }
  42.  
  43. /* ******************
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
CuteOne
post
Post #2





Grupa: Zarejestrowani
Postów: 2 958
Pomógł: 574
Dołączył: 23.09.2008
Skąd: wiesz, że tu jestem?

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


Małą podpowiedź

  1. <div style="width: 100%">
  2. <div style="width: 30%; margin:0px auto;">test</div>
  3. </div>



ps. tabele nie służą do tworzenia szablonów!

Ten post edytował CuteOne 1.03.2013, 16:31:18
Go to the top of the page
+Quote Post
upeertv
post
Post #3





Grupa: Zarejestrowani
Postów: 111
Pomógł: 0
Dołączył: 5.01.2013

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


dziekuje )
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 09:25