Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CSS]Automatyczne łamanie linii
Loped
post
Post #1





Grupa: Zarejestrowani
Postów: 120
Pomógł: 0
Dołączył: 9.04.2009

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


Witam. Zrobiłem własnie użytkowników online. i Mam pewien problem. Są oni na pewnym tle

Kod

/*/ONL*/

/*ONL*/
#ONL {
       width: 221px;
     height: 123px;
     overflow: hidden;
       float: left;
       background: url(layout/index/index_23.jpg) no-repeat;


}
/*TEKST2 ONL*/
#ONL .TEKST2 {
     width 221px;
       height: 123px;
       margin-top: 0px;
     margin-right: 1px;
     margin-bottom: 0px;
     margin-left: 0px;
     font-size: 11px;
     font-family: Verdana, Arial, Helvetica, sans-serif;
     padding-top: 0px;
     padding-right: 0px;
     padding-bottom: 0px;
     padding-left: 5px;

}
/*/TEKST2 ONL*/
/*/ONL*/


I max zmieści sie tam 5 użytkowników a jest jeszcze miejsce niżej. Chciałbym aby automatycznie nazwa użytkownika przesuneła się w dół jeśli by się nie mieściła w jednej lini. Wie ktoś jak to zrobić?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Loped
post
Post #2





Grupa: Zarejestrowani
Postów: 120
Pomógł: 0
Dołączył: 9.04.2009

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


Kod

/*/ONL*/

/*ONL*/
#ONL {
       width: 221px;
     height: 123px;
     overflow: hidden;
       float: left;
       background: url(layout/index/index_23.jpg) no-repeat;


}
/*TEKST2 ONL*/
#ONL .TEKST2 {
     width 221 px;
       overflow: auto;
margin-top: 0px;
     margin-right: 1px;
     margin-bottom: 0px;
     margin-left: 0px;
     font-size: 11px;
     font-family: Verdana, Arial, Helvetica, sans-serif;
     padding-top: 0px;
     padding-right: 0px;
     padding-bottom: 0px;
     padding-left: 5px;

}
/*/TEKST2 ONL*/
/*/ONL*/


i Wyświetlanie tych div'ów :

Kod

<div id="ONL"><div class="TEKST2" id="ONL_TEKST2"><?php online(); ?>  </div></div>


I funkcja online:

  1. <?php
  2. function online()
  3. {
  4. $lacz = lacz_bd();
  5. $psel = $lacz->query("select id, nazwa_uz, czas, ranga from uzytkownik");
  6. $ctime = time();
  7.  
  8. while ($pl = $psel->fetch_array()) {
  9. $span = ($ctime - $pl[czas]);
  10.  
  11. if ($span <= 180) {
  12. if ($pl[ranga] == Admin) {
  13. print "<span style=\"color: #FF0000;\"> $pl[nazwa_uz]</span>&nbsp;";
  14. } else {
  15. print "$pl[nazwa_uz]&nbsp;";
  16. }
  17.  }
  18.    }
  19. }
  20. ?>
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: 13.10.2025 - 22:44