Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CSS] Problem z poziomą listą
mczlowiek
post
Post #1





Grupa: Zarejestrowani
Postów: 210
Pomógł: 0
Dołączył: 26.05.2008

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


mamt aki oto problem, za choinke lista nie chce wyświetlić się w poziomie

Kod
#wiecej {background-color: #ddd;
    border-width: 1px 0;
    border-style: solid;
    border-color: gray;
    padding: 3px 5%;
    margin: 0;
}


                
#wiecej  ul {      
                list-style-image:none;
                list-style-position:outside;
                list-style-type:none;
                margin:12px 0 0;
                padding:0;
                width:500px;
                display:inline;
                clear:left;
                float:left;
                margin-left:12px;
            }
                

#wiecej li {
                background:transparent url(images/lista/bullet_5x5.gif) no-repeat scroll left 9px;
                clear:left;
                display:inline;
                float:left;
                margin-left:12px;
                }


  1. <ul id="wiecej">
  2.                                <li>Wszystko</li>
  3.                                <li>Typy</li>
  4.                                <li>Zapowiedzi</li>
  5.                                <li>Kontuzje</li>
  6.                                <li>Transfery</li>
  7.                            </ul>
  8. ?>


Lista wyświetla mi się w pionie, nawet odpowiednich odległości nie zachowuje, dlaczego? kombinuje i kombinuje i nic z tego... (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)
Powód edycji: [erix] poprawka bbcode
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 9)
zzeus
post
Post #2





Grupa: Zarejestrowani
Postów: 441
Pomógł: 71
Dołączył: 3.09.2007
Skąd: wrocław

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


id masz przypisane do ul więc spróbuj tak

Kod
#wiecej{
list-style-image:none;
list-style-position:outside;
list-style-type:none;
margin:12px 0 0;
padding:0;
width:500px;
display:inline;
clear:left;
float:left;
margin-left:12px;
}


#wiecej li {
background:transparent url(images/lista/bullet_5x5.gif) no-repeat scroll left 9px;
clear:left;
display:inline;
float:left;
margin-left:12px;
}
Go to the top of the page
+Quote Post
nmts
post
Post #3





Grupa: Zarejestrowani
Postów: 283
Pomógł: 34
Dołączył: 21.03.2008

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


Kod
#wiecej {
background-color: #ddd;
border-width: 1px 0;
border-style: solid;
border-color: gray;
padding: 3px 5%;
margin: 0;
list-style-image:none;
list-style-position:outside;
list-style-type:none;
margin:12px 0 0;
padding:0;
width:500px;
display:inline;
clear:left;
float:left;
margin-left:12px;
}

#wiecej li {
background:transparent url(images/lista/bullet_5x5.gif) no-repeat scroll left 9px;
clear:left;
display:inline;
margin-left:12px;
}


nie potrzebne float:left dla li.
Go to the top of the page
+Quote Post
mczlowiek
post
Post #4





Grupa: Zarejestrowani
Postów: 210
Pomógł: 0
Dołączył: 26.05.2008

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


Problemy są teraz 2:
1) dlaczego liste poziomą nie wyświetla w div'ie "subc", tylko poza nim, mimo, że znajduje się w jego "ramionach" w kodzie?

  1. <?php
  2. <div class="subc">
  3.                            Filtruj wiadomości:            
  4.                            <ul id="wiecej">
  5.                                <li>Wszystko</li>
  6.                                <li>Typy</li>
  7.                                <li>Zapowiedzi</li>
  8.                                <li>Kontuzje</li>
  9.                                <li>Transfery</li>
  10.                            </ul>
  11. </div><!--subc-->
  12. ?>

styl dla subc
  1. <?php
  2. .subc{ padding:10 10 10 10; background: white; border:1px solid #D2D2D2;margin-bottom:10px;}
  3. ?>


2. jak ten czerwony kwadracik podnieść troszkę do góry aby nie był na samym dole, chcę go po prostu wyśrodkować
(IMG:http://images49.fotosik.pl/92/9ab8a32145d3c378.gif)



INFO - div subc - to ten biały "prostokącik" (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
Go to the top of the page
+Quote Post
K4mil94
post
Post #5





Grupa: Zarejestrowani
Postów: 302
Pomógł: 18
Dołączył: 10.03.2008
Skąd: Dębno

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


Daj sobie tylko padding-left: 10px; a ten padding: 10 10 10 10; wywal.

Ten post edytował K4mil94 27.03.2009, 08:28:17
Go to the top of the page
+Quote Post
piotrooo89
post
Post #6


Newsman


Grupa: Moderatorzy
Postów: 4 005
Pomógł: 548
Dołączył: 7.04.2008
Skąd: Trzebinia/Kraków




pokaż jak stylujesz liste.
Go to the top of the page
+Quote Post
mczlowiek
post
Post #7





Grupa: Zarejestrowani
Postów: 210
Pomógł: 0
Dołączył: 26.05.2008

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


nie ma tego, cały kod zamieściłem

lista:
  1. <?php
  2. #wiecej {
  3. margin: 0;
  4. list-style-image:none;
  5. list-style-position:outside;
  6. list-style-type:none;
  7. margin:0 0 0 0;
  8. padding:0;
  9. display:inline;
  10. clear:left;
  11. float:left;
  12. }
  13.  
  14. #wiecej li {
  15. background:transparent url(images/lista/bullet_5x5.gif) no-repeat scroll left 9px;
  16. clear:left;
  17. display:inline;
  18. margin-right:20px;
  19. padding-left:12px;
  20. }
  21.  
  22. #wiecej a {
  23.    color:#5C5C5C;
  24.    font-family:Arial,sans-serif;
  25.    font-size:11px;
  26.    text-decoration:none;
  27.    }
  28. ?>


2. punkt drugi zrobiony, jescze tylko punkt 1.

Ten post edytował mczlowiek 27.03.2009, 08:31:28
Go to the top of the page
+Quote Post
K4mil94
post
Post #8





Grupa: Zarejestrowani
Postów: 302
Pomógł: 18
Dołączył: 10.03.2008
Skąd: Dębno

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


Cytat(piotrooo89 @ 27.03.2009, 08:29:19 ) *
pokaż jak stylujesz liste.


list-style: none;

Pozatym to padding daje w dół tekst. (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
Go to the top of the page
+Quote Post
piotrooo89
post
Post #9


Newsman


Grupa: Moderatorzy
Postów: 4 005
Pomógł: 548
Dołączył: 7.04.2008
Skąd: Trzebinia/Kraków




dodaj do .subc overflow: hidden;
Go to the top of the page
+Quote Post
mczlowiek
post
Post #10





Grupa: Zarejestrowani
Postów: 210
Pomógł: 0
Dołączył: 26.05.2008

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


ja tą listę umieścic we wspomnianym wcześniej divie, gdyż mimo iz w kodzie znajduje sie w nim to wychodzi poza niego

Cytat(piotrooo89 @ 27.03.2009, 08:37:37 ) *
dodaj do .subc overflow: hidden;

Dziękuje, wszystko oki!
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 - 23:12