Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [css][html] Problem z margin gdy nad tym jest float: left;
poxrimex
post
Post #1





Grupa: Zarejestrowani
Postów: 368
Pomógł: 2
Dołączył: 23.09.2007

Ostrzeżenie: (60%)
XXX--


mam z tym taki problem:

  1. <div class="strona">
  2.  
  3. <div style="background-color: blue; width: 200px;">
  4. ABC
  5. </div>
  6.  
  7. <div style="background-color: blue; width: 200px; float: left;">
  8. ABC
  9. </div>
  10.  
  11. </div>
  12.  
  13.  
  14. <div class="stopka">
  15. <a href="s.html">abc</a>
  16. <a href="t.html">abc</a>
  17. <a href="y.html">ac</a>
  18. </div>

  1. div.stopka
  2. {
  3. clear: both;
  4. margin-top: 80px;
  5. margin-left: auto;
  6. margin-right: auto;
  7. }


Z tym skryptem jest tak że, kiedy pojawiają się te linijki:

  1. <div style="background-color: blue; width: 200px;">
  2. ABC
  3. </div>
  4.  
  5. <div style="background-color: blue; width: 200px; float: left;">
  6. ABC
  7. </div>


To dla divu stopka przestaje działać atrybut margin-top

Ten post edytował poxrimex 10.03.2008, 15:59:34


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



Go to the top of the page
+Quote Post
bogdan89
post
Post #2





Grupa: Zarejestrowani
Postów: 320
Pomógł: 36
Dołączył: 28.08.2006
Skąd: Wrocław

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


to daj dla div.strona i dla div.stopka display:table, albo display:block.
Go to the top of the page
+Quote Post
nevt
post
Post #3





Grupa: Przyjaciele php.pl
Postów: 1 595
Pomógł: 282
Dołączył: 24.09.2007
Skąd: Reda, Pomorskie.

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


po tym (ale przed stopką)
  1. <div style="background-color: blue; width: 200px; float: left;">
  2. ABC
  3. </div>html]
  4. dopisz
  5. [html]
  6. <div style="clear: both;"></div>


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

-
Oh no, my young coder. You will find that it is you who are mistaken, about a great many things... -
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:13