Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CSS] rollover - niechciany odstęp (br)
XvAK
post 23.12.2009, 15:25:11
Post #1





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 22.12.2009

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


Mam następujący kod CSS
  1. #roll2 {
  2. margin: 1em;
  3. }
  4. img { border: none; }
  5.  
  6.  
  7. #roll2 a.rollover {
  8. width: 200px;
  9. display: block;
  10. overflow: hidden;
  11. }
  12.  
  13. #roll2 a.rollover img {
  14. display: block;
  15. }
  16.  
  17. #roll2 a.rollover:hover img {
  18. margin-left: -200px;
  19. }


I chcę to wykorzystać w ten sposób
  1. <div id="roll2">
  2. <a class="rollover" href="http://rzeznia.eu/los.php"><img src="http://img.rzeznia.eu/kup_serwer.png" height="90" alt="Kup Serwer" /></a>
  3. <a href="http://rzeznia.eu/click.php?id=6"><img src="http://img.amxboard.pl/r1.png" style="border: 0px none ; width: 500px; height: 90px;"></a>
  4. <a class="rollover" href="http://rzeznia.eu/los.php"><img src="http://img.rzeznia.eu/kup_steam.png" height="90" alt="Kup Steam" /></a>
  5. </div>


Występuje coś czego nie chcę - każdy obrazek jest w nowej linii zamiast jeden obok drugiego.
Jak prawidłowo powinien wyglądać ten kod?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
Lion_87
post 23.12.2009, 15:49:49
Post #2





Grupa: Zarejestrowani
Postów: 850
Pomógł: 120
Dołączył: 15.02.2007
Skąd: Łódź

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


A może zapisz wszystko w 1 lini? ^^
  1. <div id="roll2">
  2. <a class="rollover" href="http://rzeznia.eu/los.php"><img src="http://img.rzeznia.eu/kup_serwer.png" height="90" alt="Kup Serwer" /></a><a href="http://rzeznia.eu/click.php?id=6"><img src="http://img.amxboard.pl/r1.png" style="border: 0px none ; width: 500px; height: 90px;"></a><a class="rollover" href="http://rzeznia.eu/los.php"><img src="http://img.rzeznia.eu/kup_steam.png" height="90" alt="Kup Steam" /></a>
  3. </div>


...

Ten post edytował Lion_87 23.12.2009, 15:50:22
Go to the top of the page
+Quote Post
230005
post 23.12.2009, 16:18:50
Post #3





Grupa: Zarejestrowani
Postów: 316
Pomógł: 36
Dołączył: 2.04.2008

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


To chyba nie pomoże smile.gif. Spróbuj w ten sposób: http://www.kurshtml.boo.pl/css/poziome_menu,menu.html
Go to the top of the page
+Quote Post
XvAK
post 23.12.2009, 17:23:08
Post #4





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 22.12.2009

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


Lion_87 akurat to nie pomogło, bo tak też próbowałem i pierwotnie tak miałem, tylko ze względu czytelności dodałem odstępy przy wstawianiu na forum winksmiley.jpg

230005 spróbuję.

@edit.
Udało się przy zastosowaniu float.

Ten post edytował XvAK 23.12.2009, 19:35:59
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 28.06.2025 - 07:49