Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> znacznik <p> w <td>
Luke
post 26.01.2005, 09:45:04
Post #1





Grupa: Przyjaciele php.pl
Postów: 215
Pomógł: 0
Dołączył: 28.10.2003
Skąd: -

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


  1. <table width="80%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
  2. <tr>
  3. <td align="left" valign="top"><p>sdfsdfsdfsdfsdfsdfsdfsdf</p>
  4. <p>dfsdfsdfsdfsdfsdfsd</p>
  5. <p>sfsdfsdfsdfsdfsdf</p></td>
  6. </tr>


Ten prosty kod ilustruje odstep znacznika <p> od gornej i dolnej krawedzi komorki, ktory wystepuje w przegladarkach Mozilla. Nie wiem jak zlikwidowac te odstepy? Problem wydaje sie byc blahy jednak nie moge sobie z nim poradzic.


--------------------
<span style="font-weight: bold;">Open Source Enterprise Content Management</span>
Go to the top of the page
+Quote Post
revyag
post 26.01.2005, 09:52:35
Post #2





Grupa: Przyjaciele php.pl
Postów: 2 258
Pomógł: 16
Dołączył: 21.09.2004
Skąd: Kielce

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


  1. <p style="margin:0">


--------------------
-------------

------
Go to the top of the page
+Quote Post
Luke
post 26.01.2005, 10:01:47
Post #3





Grupa: Przyjaciele php.pl
Postów: 215
Pomógł: 0
Dołączył: 28.10.2003
Skąd: -

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


Ten kod likwiduje odstep miedzy gorna i dolna krawedzia komorki tabeli oraz odstepy miedzy paragrafami, ktore powinny zostac nie ruszone. Jest jakis inny sposob?


--------------------
<span style="font-weight: bold;">Open Source Enterprise Content Management</span>
Go to the top of the page
+Quote Post
sf
post 26.01.2005, 10:04:09
Post #4





Grupa: Zarejestrowani
Postów: 1 597
Pomógł: 30
Dołączył: 19.02.2003
Skąd: Tychy

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


margin-top, margin-bottom lub margin: rozmiar_gorny roz_prawy roz_dolny roz_lewy


--------------------
Zapraszam na mój php blog, tworzenie stron.
Go to the top of the page
+Quote Post
Luke
post 26.01.2005, 10:10:37
Post #5





Grupa: Przyjaciele php.pl
Postów: 215
Pomógł: 0
Dołączył: 28.10.2003
Skąd: -

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


  1. <table width="80%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
  2. <tr>
  3. <td align="left" valign="top" style="margin-top:0px; margin-bottom:0px;"><p>sdfsdfsdfsdfsdfsdfsdfsdf</p>
  4. <p>dfsdfsdfsdfsdfsdfsd</p>
  5. <p >sfsdfsdfsdfsdfsdf</p>
  6.  
  7. </td>
  8. </tr>


Niestety nie dziala. Natomiast <p style="margin-top:0px"></p> i analogicznie z margin-bottom nie wchodzi w gre ...


--------------------
<span style="font-weight: bold;">Open Source Enterprise Content Management</span>
Go to the top of the page
+Quote Post
revyag
post 26.01.2005, 10:22:08
Post #6





Grupa: Przyjaciele php.pl
Postów: 2 258
Pomógł: 16
Dołączył: 21.09.2004
Skąd: Kielce

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


Zdefiniowanie stylu margin dla komróki tabeli nic nie da, bo odstęp jest generowany przez znacznik <p></p>. Więc modyfikacja tylko jego moze coś zmienić.
Cytat
Natomiast <p style="margin-top:0px"></p> i analogicznie z margin-bottom nie wchodzi w gre ...

a dlaczego ? Przeciez to jest dobre rozwiązanie.


--------------------
-------------

------
Go to the top of the page
+Quote Post
dr_bonzo
post 26.01.2005, 10:25:05
Post #7





Grupa: Przyjaciele php.pl
Postów: 5 724
Pomógł: 259
Dołączył: 13.04.2004
Skąd: N/A

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


Dziwne u mnie pod opera 7.5 i ffoxem 1 nie ma odstepu miedzy paragrafem a komorka tabeli -- sa dstepy miedzy paragrafami. Sproboj <td style="padding: 0px">


--------------------
Nie lubię jednorożców.
Go to the top of the page
+Quote Post
Luke
post 26.01.2005, 10:28:35
Post #8





Grupa: Przyjaciele php.pl
Postów: 215
Pomógł: 0
Dołączył: 28.10.2003
Skąd: -

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


Bo jezeli zrobie tak

<style type="text/css">
<!--
p {
margin-top: 0px;
margin-bottom: 0px;
}
-->
</style>

To efekt bedzie taki sam jak margin:0

Content w komorce tabeli jest efektem dzialania CMS`a. To musi byc jakis odgornie narzucony styl dla tej komorki. Kazde "enter (nowa linia)" w generuje znacznik <p>


--------------------
<span style="font-weight: bold;">Open Source Enterprise Content Management</span>
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: 26.06.2025 - 16:08