Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][CSS] Problem z układem div
krzychu0808
post
Post #1





Grupa: Zarejestrowani
Postów: 428
Pomógł: 2
Dołączył: 1.04.2007
Skąd: Pogorzelica

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


Witam mam problem pokaże go na prostym przykładzie chcę aby ten kwadracik żółty był pod szarym Dwa kwadraty

Kod
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <title>Klasa 2 TH | TME | Strona Klasowa</title>
  3. <script type="text/javascript" src="menu.js"></script>
  4. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2">
  5. <style type="text/css">
  6. .opis1 {
  7. margin : auto;
  8. padding : 0px;
  9. height : 67px;
  10. float : left;
  11. background-color: #070707;
  12. }
  13. .ikonki {
  14. margin : auto;
  15. padding : 0px;
  16. height : 24px;
  17. float : left;
  18. background-color: #ffe400;
  19. }
  20. </head>
  21.  
  22. <div class="opis1">1111</div>
  23. <div class="ikonki">1111</div>
  24. </body>
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
trucksweb
post
Post #2





Grupa: Zarejestrowani
Postów: 1 199
Pomógł: 31
Dołączył: 22.03.2004
Skąd: Warszawa

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


jak ustawiasz height to ustawiasz takze width- bez tego nie dziala cala warstwa.
tu masz poprawny kod:

  1. .opis1 {
  2. margin : auto;
  3. padding : 0px;
  4. height : 67px;
  5. width: 20px;
  6. float : left;
  7. background-color: #070707;
  8. position: absolute
  9. }
  10. .ikonki {
  11. margin : auto;
  12. padding : 0px;
  13. height : 24px;
  14. width: 100px;
  15. float : left;
  16. background-color: #ffe400;
  17. }


Ten post edytował trucksweb 13.07.2008, 21:59:56
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: 15.10.2025 - 07:15