Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][CSS]Odstęp pomiędzy divami
Ivanowski
post
Post #1





Grupa: Zarejestrowani
Postów: 51
Pomógł: 0
Dołączył: 7.07.2014

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


Cześć. Mój problem polega na tym, że divy mają odstęp od siebie i nie wiem jak to zmienić problem wygląda tak :
(IMG:http://iv.pl/images/66561750099235729903.png)
Kod HTML:
  1. <div class="box">
  2.  
  3. <div class="box_avatar">
  4. Tekst
  5. </div>
  6.  
  7. <div class="box_name">
  8. Tekst 2
  9. </div>
  10.  
  11. </div>
  12.  
  13. .box {
  14. display: block;
  15. height: 100px;
  16. margin-bottom: 25px;
  17. }
  18. .box_avatar {
  19. line-height: 100px;
  20. display: inline-block;
  21. background: orange;
  22. min-width: 100px;
  23.  
  24. text-align: center;
  25. }
  26. .box_name {
  27. line-height: 50px;
  28. display: inline-block;
  29. background: yellow;
  30. vertical-align: top;
  31. min-width: 896px;
  32. }


Próbowałem dawać margin, padding, border na 0 i nic nie dawało.

Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 5)
Kloc
post
Post #2





Grupa: Zarejestrowani
Postów: 115
Pomógł: 8
Dołączył: 8.06.2014

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


Usuń z box_name i box_avatar display i daj dla obu float left.
Go to the top of the page
+Quote Post
Ivanowski
post
Post #3





Grupa: Zarejestrowani
Postów: 51
Pomógł: 0
Dołączył: 7.07.2014

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


Nadal taki sam efekt
Go to the top of the page
+Quote Post
muumiin
post
Post #4





Grupa: Zarejestrowani
Postów: 105
Pomógł: 0
Dołączył: 17.09.2014
Skąd: Kraków

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


a border masz 0?
Go to the top of the page
+Quote Post
trueblue
post
Post #5





Grupa: Zarejestrowani
Postów: 6 806
Pomógł: 1828
Dołączył: 11.03.2014

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


W przypadku inline-block, nie może być w strukturze html białych znaków pomiędzy elementami. Usuń entery, spacje, itp.

Ten post edytował trueblue 10.11.2014, 22:30:25
Go to the top of the page
+Quote Post
Ivanowski
post
Post #6





Grupa: Zarejestrowani
Postów: 51
Pomógł: 0
Dołączył: 7.07.2014

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


(IMG:style_emoticons/default/smile.gif) ))) działało po zastosowaniu float lecz miałem ustawione width i nie "działało"
Go to the top of the page
+Quote Post

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: 22.08.2025 - 13:18