Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Odleglosc miedzy elementami LI
Balas
post
Post #1





Grupa: Zarejestrowani
Postów: 347
Pomógł: 0
Dołączył: 27.08.2005
Skąd: Inowrocław

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


Jak zmienic odleglosc miedzy elementami listy LI (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) Chodzi mi dokładnie o odstep np. miedzy 1 i 2, 2 i 3, ale zeby miedzy 3 i "otoczeniem" takego nie bylo, wiec marginesy dla LI odpadaja.

Jak ktos zrozumial o co mi chodzi moze pomoc (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/snitch.gif)

edit:
Czy jedynym zrowiazaniem jest nadanie kazdemu LI classy i w niej dac wszystkim oprocz ostatniego margin (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

Ten post edytował OnE.Killer 26.02.2006, 14:26:18
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 8)
revyag
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 2 258
Pomógł: 16
Dołączył: 21.09.2004
Skąd: Kielce

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


Kod
ul li {
    padding-top:5px;
}

o to chodzi ?
Go to the top of the page
+Quote Post
Balas
post
Post #3





Grupa: Zarejestrowani
Postów: 347
Pomógł: 0
Dołączył: 27.08.2005
Skąd: Inowrocław

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


nie (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)

pokaze mniej wiecej o co chodzi :]
Kod
|                                 |
|+-------+   +-------+   +-------+|
||button |1px|button |1px|button ||
|+-------+   +-------+   +-------+|
|                                 |


Kazde LI ma parametr float: left
Go to the top of the page
+Quote Post
Zajec
post
Post #4





Grupa: Zarejestrowani
Postów: 1 086
Pomógł: 8
Dołączył: 10.12.2003

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


Kod
li { margin-left: 1px; }
li:first-child { margin-left: 0; }
Go to the top of the page
+Quote Post
Balas
post
Post #5





Grupa: Zarejestrowani
Postów: 347
Pomógł: 0
Dołączył: 27.08.2005
Skąd: Inowrocław

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


Dzieki zajec (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

EDIT

Tylko jest jeden problem, to nie działa pod IE

Ten post edytował OnE.Killer 26.02.2006, 17:56:34
Go to the top of the page
+Quote Post
Zajec
post
Post #6





Grupa: Zarejestrowani
Postów: 1 086
Pomógł: 8
Dołączył: 10.12.2003

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


No tak...
Kod
li { margin-left: 1px; }
li:first-child { margin-left: 0; }
  1. <ul id="menu">
  2. <li>a</li>
  3. <li>b</li>
  4. <li>c</li>
  5. </ul>
Kod
<!--[if lt IE 7]><script type="text/javascript">
document.getElementById('menu').getElementsByTagName('li')[0].style.marginLeft=0;
</script><![endif]-->


Ten post edytował Zajec 26.02.2006, 20:02:07
Go to the top of the page
+Quote Post
Balas
post
Post #7





Grupa: Zarejestrowani
Postów: 347
Pomógł: 0
Dołączył: 27.08.2005
Skąd: Inowrocław

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


Teraz OK :]

Ten post edytował OnE.Killer 27.02.2006, 19:19:43
Go to the top of the page
+Quote Post
Jarod
post
Post #8





Grupa: Zarejestrowani
Postów: 1 190
Pomógł: 27
Dołączył: 23.04.2005

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


Cytat(Zajec @ 2006-02-26 19:01:01)
No tak...
Kod
li { margin-left: 1px; }
li:first-child { margin-left: 0; }
  1. <ul id="menu">
  2. <li>a</li>
  3. <li>b</li>
  4. <li>c</li>
  5. </ul>
Kod
<!--[if lt IE 7]><script type="text/javascript">
document.getElementById('menu').getElementsByTagName('li')[0].style.marginLeft=0;
</script><![endif]-->

Wiem, że głupie pytanie ale gdzie w którym miejscu zamieszczać

Kod
<!--[if lt IE 7]><script type="text/javascript">
document.getElementById('menu').getElementsByTagName('li')[0].style.marginLeft=0;
</script><![endif]-->


I dlaczego IE pieprzy tyle reguł i trzeba sobie pomagać JS?
Go to the top of the page
+Quote Post
revyag
post
Post #9





Grupa: Przyjaciele php.pl
Postów: 2 258
Pomógł: 16
Dołączył: 21.09.2004
Skąd: Kielce

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


1. Pod listą.

Cytat
I dlaczego IE pieprzy tyle reguł i trzeba sobie pomagać JS?

Life...
(IMG:http://forum.php.pl/style_emoticons/default/snitch.gif)
A poważniej to dlatego że wspiera css 2 w niewielkiej jego części. A dlaczego ? No cóż, ktoś "na górze" pewnie kiedyś zdecydował że standardy nie są dla nich aż tak ważne i nie będą się takimi bzdetami zajmować (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
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: 25.08.2025 - 15:32