Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][CSS] Div pod divem
adam882
post
Post #1





Grupa: Zarejestrowani
Postów: 289
Pomógł: 1
Dołączył: 2.11.2007

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


Witam

Chcę wykombinować, aby bloki <div> znajdowały się obok siebie, ale również nie miały przerw pod sobą. Mam taki kod:
  1. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
  2. <title>Tytuł</title>
  3. <style type="text/css">
  4. .blok{width:100px; border:1px solid #dedede; margin:5px; padding:5px; float:left;
  5. </head>
  6. <div style="width:400px;">
  7. <div class="blok">sds</div>
  8. <div class="blok">aaa<br />aaa<br />adasdsadsad</div>
  9. <div class="blok">cccc<br />ccc</div>
  10. <div class="blok">ddd<br />ddd<br />ddd<br />ddd</div>
  11. <div class="blok">eeee</div>
  12. <div class="blok">eee<br />ee</div>
  13. </div>
  14. </body>
  15. </html>
  16.  

Ma ktoś może jakieś pomysły?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
yta
post
Post #2





Grupa: Zarejestrowani
Postów: 201
Pomógł: 3
Dołączył: 10.04.2010

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


Zobacz człowieczku tak najprościej , możesz także kombinować z marginesami i floatami (IMG:style_emoticons/default/smile.gif)

  1.  
  2. <style type="text/css">
  3.  
  4. .sds { width:40px; height:20px; border:2px solid black; position:relative; left:10px; }
  5. .aaa { width:40px; height:20px; border:2px solid black ; position:relative; left:10px; top:5px;}
  6. .ccc { width:40px; height:20px; border:2px solid black ; position:relative; left:10px; top:10px; }
  7. .ddd { width:40px; height:20px; border:2px solid black ; position:relative; left:60px; top:-70px; }
  8. .eee { width:40px; height:20px; border:2px solid black ; position:relative; left:60px; top:-60px; }
  9. .eeef { width:40px; height:20px; border:2px solid black ; position:relative; left:110px; top:-120px; }
  10.  
  11.  
  12. </head>
  13.  
  14. <div class="sds">sds</div>
  15. <div class="aaa">aaa</div>
  16. <div class="ccc">ccc</div>
  17. <div class="ddd">ddd</div>
  18. <div class="eee">eee</div>
  19. <div class="eeef">eeef</div>
  20.  
  21. </body>
  22.  
  23. </html>
  24.  


Tutaj ustaw odpowiednie wielkści elementom i ładnie sobie poustawiasz (IMG:style_emoticons/default/smile.gif)
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: 17.10.2025 - 03:42