Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Dziwne zachowanie diva w zależności od zawartości
Dominator
post
Post #1





Grupa: Zarejestrowani
Postów: 565
Pomógł: 15
Dołączył: 11.10.2010

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


Witam,
spotkałem się dziś z dziwnym zachowaniem diva - polega ono na tym, że jeśli jest w nim dużo tekstu to jest OK, ale jak jest mało to sobie wędruje w prawo...

Jak to rozwiązać?

http://scr.hu/0f9/xxc27

Gdy zamiast lorem ipsum napisałbym jeszcze z 5-6 wyrazów to zachowałby się normalnie.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Dominator
post
Post #2





Grupa: Zarejestrowani
Postów: 565
Pomógł: 15
Dołączył: 11.10.2010

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


  1. <div id="messageContainer">
  2. <div class="imageBox"><div id="img"></div></div>
  3. <div id="boxText">
  4. wiadomosc1
  5. </div>
  6. </div>
  7.  


  1. #img
  2. {
  3. margin-top: 0%;
  4. border-radius: 25px;
  5. margin-left: 10%;
  6. margin-bottom: 2%;
  7. background-image:url(../img/avatar.png);
  8. width: 48px;
  9. height: 48px;
  10. background-repeat: no-repeat;
  11. background-size:auto;
  12. float: left;
  13. }
  14.  
  15. .imageBox
  16. {
  17.  
  18. margin-bottom: 5%;
  19. margin-top: 2%%;
  20. margin-left: -10%;
  21. }
  22.  
  23. #messageContainer
  24. {
  25. /*
  26.   border-bottom: 2px solid #1976D2;
  27.   */
  28.  
  29. }
  30.  
  31. #boxText
  32. {
  33. margin-top: -3%;
  34. margin-bottom: 2%;
  35. width: auto;
  36. background-color: #E3F2FD;
  37. height: auto;
  38. padding: 1.5%;
  39. margin-left: 8.5%;
  40. margin-right: 5%;
  41.  
  42. overflow:hidden;
  43.  
  44. position: relative;
  45.  
  46. -webkit-border-radius: 15px;
  47. -moz-border-radius: 15px;
  48. border-radius: 15px;
  49.  
  50. }


Ktoś pomoże?
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: 30.12.2025 - 03:38