Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> menu kategorii na liscie ul, dodanie obrazka nie działą
john_doe
post
Post #1





Grupa: Zarejestrowani
Postów: 873
Pomógł: 25
Dołączył: 24.07.2005

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


Witam,
css
  1. #category {
  2. width: 136px;
  3. float:left;
  4. }
  5.  
  6. #category ul
  7. {
  8. font-family: Arial, Helvetica, sans-serif;
  9. list-style-type: none;
  10. margin: 0;
  11. padding: 0;
  12. }
  13.  
  14. #category li
  15. {
  16. display: inline;
  17. /* dla IE5 and IE6 */
  18. }
  19.  
  20. #category a
  21. {
  22. color: #000000;
  23. text-decoration: none;
  24. font-size: 12px;
  25. display: block;
  26. padding: 3px;
  27. width: 136px;
  28. background-color: #ffffff;
  29. border-bottom: 1px solid #eee;
  30. }
  31.  
  32. #category a:hover
  33. {
  34. background-color: #87bf3b;
  35. color: #fff;
  36. }
  37.  
  38. #category #current
  39. {
  40. border-bottom: 3px solid #ffac4a;
  41. /* background: #87bf3b; */
  42. }


  1. <?php
  2. $resultCat = connect( $SELECT_CATEGORIES );
  3.                print '<div id="category">';
  4.                print '<ul>';
  5.                print '<li><a href="#"><b>KATEGORIE</b></a></li>';
  6.                while( $row = mysql_fetch_array( $resultCat ) )
  7.                {
  8. //<img src="../img/categoryArrow.png" />&nbsp;&nbsp;
  9.                    if( $row[0] == (int)$_GET['id'] )
  10.                    {
  11.                        print '<li>
  12.                    <a href="index.php?id=' . $row[0] . '&page=0" id="current">' . $row[1] . '</a></li>';
  13.                    }else
  14.                    print '<li><a href="index.php?id=' . $row[0] . '&page=0">' . $row[1] . '</a></li>';
  15.                    
  16.                 }                
  17.                print '</ul>';
  18.                print '</div>';
  19. ?>


zakomentowałem linijke z obrazem. Tą linijkę chce wpakować w petli while zaraz po <li> tak aby moje menu wygladało tak:
> opcja1
> opcja2
> opcja3

a robi to tak
>
opcja1
>
opcja2
>
opcja3

jak to zmienić?
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: 24.12.2025 - 10:41