Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [HTML] Problem ze złymi wymiarami loga?
CryWolf
post 13.12.2008, 19:07:19
Post #1





Grupa: Zarejestrowani
Postów: 93
Pomógł: 0
Dołączył: 9.06.2007

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


witam, moje logo ma wymiary 600x130, tabelka ma także 600x130 lecz gdy odpalam stronę przez przeglądarkę logo jest większe niż 600 na 130, czemu tak jest? inne tabele są dobrze wymierzone, mam ten problem z nie pierwszą stroną. pozdrawiam
Go to the top of the page
+Quote Post
Lion_87
post 13.12.2008, 19:24:01
Post #2





Grupa: Zarejestrowani
Postów: 850
Pomógł: 120
Dołączył: 15.02.2007
Skąd: Łódź

Ostrzeżenie: (10%)
X----


Pokaz kod moze tam jest cos zle.
Go to the top of the page
+Quote Post
CryWolf
post 13.12.2008, 19:27:39
Post #3





Grupa: Zarejestrowani
Postów: 93
Pomógł: 0
Dołączył: 9.06.2007

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


  1. <?php
  2. echo '<center><body bgcolor="black">';// zmienna potrzebna do prawidlowego wczytania includowanych plikow
  3. $add_site = true;
  4. ?>
  5. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  6. <html>
  7. <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  8. <meta http-equiv="Reply-to" content="xxx" />
  9. <meta name="Author" content="xxx" />
  10. <head>
  11.  
  12.  <title>Guitar Arena</title>
  13.  <style type="text/css">
  14.    <!--
  15.    
  16.    body {
  17.    font-family: Verdana, Arial;
  18.    font-size: 12px;
  19.    }
  20.    
  21.    -->
  22.  </style>
  23.  
  24. </head>
  25. <body>
  26.  <table border="0" cellspacing="0" cellpadding="0">
  27.  
  28.    <td width="600" height="130" colspan="3"><img src="img/logo.jpg" width="600" height="130"><?php include "include/naglowek.php"; ?></td>
  29.  </tr>
  30.  <tr>
  31.  
  32.  
  33.    <td width="100" height="270" valign="top" bgcolor="red"><?php include "include/menu_lewe1.php"; ?></td>
  34.  
  35.  
  36.  
  37.    <td width="400" height="540" valign="top" bgcolor="blue" rowspan="2" cellpadding="10"><font color="white">
  38.  
  39.  
  40.    <?php
  41.        // zmienna $go przekazana metoda GET
  42.      $go = $_GET['go'];
  43.      
  44.      // sprawdzamy czy zmienna $go nie jest pusta
  45.      if(!empty($go)) {
  46.          // sprawdzamy czy plik o danej nazwie istnieje
  47.          if(is_file("page/$go.html"))
  48.  
  49.  
  50.  
  51. { echo '<center><br><br><table border="0"><td width="450"><font color="white">';
  52. include "page/$go.html";
  53. echo '</td></table>'; }
  54.  
  55.  
  56.  
  57.          // jezeli plik nie istnieje wyswietla się komunikat
  58.          else echo "<br />Nie ma takiej strony :-(";
  59.      }
  60.      // jezeli zmienna $go jest pusta wyswietla się strona glowna
  61.      else
  62.  
  63.  
  64. { echo '
  65. <center><br><br><table border="1"><td width="350"><font color="white">';
  66. include "page/start.html";
  67. echo '</td></table>'; }
  68.  
  69.  
  70.      
  71.    ?>
  72.    </td>
  73.  
  74.    <td width="100" height="270" valign="top" bgcolor="red"><?php include "include/menu_prawe1.php"; ?></td>
  75.  
  76. <tr>
  77.  
  78.    <td width="100" height="270" valign="top" bgcolor="orange"><?php include "include/menu_lewe2.php"; ?></td>
  79.    <td width="100" height="270" valign="top" bgcolor="orange"><?php include "include/menu_prawe2.php"; ?></td>
  80.  
  81.  
  82.  </tr>
  83.  <tr>
  84.  
  85.  
  86.    <td width="600" height="30" colspan="3" bgcolor="red"><?php include "include/stopka.php"; ?></td>
  87.  
  88.  
  89.  </tr>
  90.  </table>
  91. </body>
  92. </html>
Go to the top of the page
+Quote Post
Lion_87
post 13.12.2008, 19:32:06
Post #4





Grupa: Zarejestrowani
Postów: 850
Pomógł: 120
Dołączył: 15.02.2007
Skąd: Łódź

Ostrzeżenie: (10%)
X----


Cytat
<td width="600" height="130" colspan="3"><img src="img/logo.jpg" width="600" height="130"><?php include "include/naglowek.php"; ?></td>
</tr>


a gdzie <tr>?
Go to the top of the page
+Quote Post
CryWolf
post 13.12.2008, 19:41:40
Post #5





Grupa: Zarejestrowani
Postów: 93
Pomógł: 0
Dołączył: 9.06.2007

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


cytuję z góry i jest <tr>:

Cytat
<td width="600" height="130" colspan="3"><img src="img/logo.jpg" width="600" height="130"><?php include "include/naglowek.php"; ?></td>
</tr>
<tr>


<td width="100" height="270" valign="top" bgcolor="red"><?php include "include/menu_lewe1.php"; ?></td>
Go to the top of the page
+Quote Post
Lion_87
post 13.12.2008, 19:45:19
Post #6





Grupa: Zarejestrowani
Postów: 850
Pomógł: 120
Dołączył: 15.02.2007
Skąd: Łódź

Ostrzeżenie: (10%)
X----


ale chodzi mi o brak <TR>

Cytat
<tr>
<td width="600" height="130" colspan="3"><img src="img/logo.jpg" width="600" height="130"><?php include "include/naglowek.php"; ?></td>
</tr>
<tr>


<td width="100" height="270" valign="top" bgcolor="red"><?php include "include/menu_lewe1.php"; ?></td>


Niżej w kodzie tez brak jednego

A poza tym Układ strony
Go to the top of the page
+Quote Post
CryWolf
post 13.12.2008, 22:39:15
Post #7





Grupa: Zarejestrowani
Postów: 93
Pomógł: 0
Dołączył: 9.06.2007

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


ok, poczytałem co nieco o divach, przerobiłem kod na
  1. <?php  
  2. echo '<br>';// zmienna potrzebna do prawidlowego wczytania includowanych plikow
  3. $add_site = true;
  4. ?>
  5.  
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  7. <html>
  8. <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  9. <meta http-equiv="Reply-to" content="stratfan66@o2.pl" />
  10. <meta name="Author" content="Mateusz Rąpca" />
  11.  
  12. <head>
  13.  <title>Guitar Arena</title>
  14.  <style type="text/css">
  15.  
  16. html, body {
  17.    background-color: #000000;
  18.    color: #000;
  19.    margin: 0;
  20.    padding: 0;
  21. }
  22.  
  23. #NAGLOWEK {
  24.    width: 600px;
  25.    height: 130px;
  26.        background-image: url("img/logo.jpg");
  27.        float:none }
  28.  
  29. #CENTER {
  30.    width: 300px;
  31.    overflow: hidden;
  32.    background-color: #ccc;   }
  33.  
  34. #LEWE1 {
  35.    width: 150px;
  36.    overflow: hidden;
  37.    background-color: #ccc;  
  38.    float:left; }
  39.  
  40. #LEWE2 {
  41.    width: 150px;
  42.    overflow: hidden;
  43.    background-color: #ccc;
  44.    float:left;   }
  45.    
  46. #PRAWE1 {
  47.    width: 150px;
  48.    overflow: hidden;
  49.    background-color: #ccc;
  50.    float:right;   }
  51.  
  52. #PRAWE2 {
  53.    width: 150px;
  54.    overflow: hidden;
  55.    background-color: #ccc;
  56.    float:right;   }
  57.    
  58. #STOPKA {
  59.    width: 300px;
  60.    overflow: hidden;
  61.    background-color: #ccc;   }
  62.  
  63.  </style>
  64.  
  65. </head>
  66. <body>
  67.  
  68.  
  69.  
  70.  
  71.    <div id="NAGLOWEK"><?php include "include/naglowek.php"; ?></div>
  72.  
  73.  
  74.  
  75.    <div id="LEWE1"><?php include "include/menu_lewe1.php"; ?></div>
  76.  
  77.  
  78.  
  79.    <div id="CENTER">
  80.    
  81.    
  82.    
  83.  
  84.  
  85.    <?php
  86.        // zmienna $go przekazana metoda GET
  87.      $go = $_GET['go'];
  88.      
  89.      // sprawdzamy czy zmienna $go nie jest pusta
  90.      if(!empty($go)) {
  91.          // sprawdzamy czy plik o danej nazwie istnieje
  92.          if(is_file("page/$go.html"))
  93.  
  94.  
  95.  
  96. { echo '<br><br><font color="white">';
  97. include "page/$go.html";  }
  98.  
  99.  
  100.          // jezeli plik nie istnieje wyswietla się komunikat
  101.          else echo "<br />Nie ma takiej strony :-(";
  102.      }
  103.      // jezeli zmienna $go jest pusta wyswietla się strona glowna
  104.      else
  105.  
  106.  
  107. { echo '
  108. <br><br><font color="white">';
  109. include "page/start.html";   }  ?>
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.    </div>
  120.  
  121.    <div id="PRAWE1"><?php include "include/menu_prawe1.php"; ?></div>
  122.    <div id="LEWE2"><?php include "include/menu_lewe2.php"; ?></div>
  123.    <div id="PRAWE2"><?php include "include/menu_prawe2.php"; ?></div>
  124.  
  125.    <div id="STOPKA"><?php include "include/stopka.php"; ?></div>
  126.  
  127.  
  128.  
  129.  
  130. </body>
  131. </html>


Jak poukładać to w sposób taki jak robi się to <TR>'ami? i jak wygląda sprawa z tymi colspanami itp. w divach? proszę o pomoc i pozdrawiam winksmiley.jpg

p.s. chwilowo wygląda to tak:
http://img218.imageshack.us/my.php?image=pagegj1.jpg

Ten post edytował CryWolf 14.12.2008, 11:36:41
Go to the top of the page
+Quote Post
Lion_87
post 14.12.2008, 15:58:04
Post #8





Grupa: Zarejestrowani
Postów: 850
Pomógł: 120
Dołączył: 15.02.2007
Skąd: Łódź

Ostrzeżenie: (10%)
X----


No albo masz rzeczywiście takie zdjęcie z białym paskiem albo to co includujesz CI tak to zmienia.
Co do reszty ułożenia to poczytaj o clear w CSS.
Go to the top of the page
+Quote Post
Skie
post 14.12.2008, 17:31:23
Post #9





Grupa: Zarejestrowani
Postów: 555
Pomógł: 84
Dołączył: 20.02.2008
Skąd: Małopolska

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


Gdy ja się przerzucałem z tabelek na div'y najbardziej pomógł mi ten artykuł: Przykłady szablonów


--------------------
Wieloprocesowość i wielowątkowość w PHP, poznaj Kraken PHP!
Serwer HTTP i WebSocket w PHP | Promise/A+
Strona Domowa | Elradia MMORPG
FireFox: make the web better.
Go to the top of the page
+Quote Post
CryWolf
post 14.12.2008, 18:57:02
Post #10





Grupa: Zarejestrowani
Postów: 93
Pomógł: 0
Dołączył: 9.06.2007

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


zrobiłem coś na tej podstawie:
  1. <?php
  2. <html><center>
  3. <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  4. <meta http-equiv="Reply-to" content="stratfan66@o2.pl" />
  5. <meta name="Author" content="Mateusz Rąpca" />
  6.  
  7. <head>
  8.  <title>Guitar Arena</title>
  9.  <style type="text/css">
  10.  
  11. html, body {
  12.    background-color: #fff;
  13.    color: #000;
  14.    margin: 0;
  15.    padding: 0;
  16. }
  17.  
  18. #top {
  19.    width: 600px;
  20. }
  21.  
  22. #NAGLOWEK {
  23.        background-image: url("img/logo.jpg");
  24.    width: 600px;
  25.    height: 130px;
  26. }
  27.  
  28. #MENU1 {
  29.        text-align: left;
  30.        clear: both;
  31.    width: 150px;
  32.    height: 300px;
  33.    overflow: hidden;
  34.    background-color: #ccc;
  35. }
  36.  
  37. #MENU2 {
  38.        text-align: left;
  39.    width: 150px;
  40.    height: 300px;
  41.    overflow: hidden;
  42.    background-color: #ccc;
  43. }
  44.  
  45. #MENU3 {
  46.        text-align: left;
  47.    width: 150px;
  48.    height: 300px;
  49.    overflow: hidden;
  50.    background-color: #ccc;
  51. }
  52.  
  53. #MENU4 {
  54.        text-align: left;
  55.    width: 150px;
  56.    height: 300px;
  57.    overflow: hidden;
  58.    background-color: #ccc;
  59. }
  60.  
  61.  
  62.  
  63.  
  64. #TRESC {
  65.    width: 300px;
  66.    height: 600px;
  67.    overflow: hidden;
  68.    background-color: #888;
  69. }
  70.  
  71. #STOPKA {
  72.        clear: both;
  73.    width: 600px;
  74.    height: 40px;
  75.    background-color: #888;
  76. }
  77.  
  78. </style>
  79. </head>
  80.  
  81.  
  82.  
  83.  
  84. <div id="top">
  85.  
  86.  
  87.  
  88.    <div id="NAGLOWEK">Nagłówek</div>
  89.  
  90.  
  91. <div style="float:left;">
  92.    <div id="MENU1">Menu1<br>Menu1<br>Menu1<br>Menu1<br>Menu1<br>Menu1<br>Menu1<br>Menu1<br></div>
  93.    <div id="MENU2">Menu2<br>Menu2<br>Menu2<br>Menu2<br>Menu2<br>Menu2<br>Menu2<br>Menu2<br></div>
  94. </div>
  95.  
  96.  
  97.  
  98. <div id="TRESC" style="float:left;">Treść strony Treść strony Treść strony Treść strony Treść strony Treść strony Treść strony Treść strony Treść strony Treść strony Treść strony Treść strony Treść strony </div>
  99.  
  100.  
  101.  
  102. <div style="float:left;">
  103.    <div id="MENU3">Menu3<br>Menu3<br>Menu3<br>Menu3<br>Menu3<br>Menu3<br>Menu3<br>Menu3<br></div>
  104.    <div id="MENU4">Menu4<br>Menu4<br>Menu4<br>Menu4<br>Menu4<br>Menu4<br>Menu4<br>Menu4<br></div>
  105. </div>
  106.  
  107.  
  108.    <div id="STOPKA">Stopka serwisu</div>
  109.  
  110.  
  111.  
  112. </div>
  113. </html>
  114. ?>

Niby ładnie ułożone jak trzeba ale cały czas logo jak i chyba wszystko jest większe niż powinno sad.gif męczę się z tym cały dzień i nie wychodzi mi sad.gif ułożenie może ok ale te wymiary... Mógłby ktoś mi poprawić to albo napisać samemu podobne? będę wdzięczny

Ten post edytował CryWolf 14.12.2008, 19:13:59
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 Wersja Lo-Fi Aktualny czas: 13.07.2025 - 23:15