Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Problem z input:hover w CSS
Landon
post
Post #1





Grupa: Zarejestrowani
Postów: 83
Pomógł: 3
Dołączył: 21.04.2007
Skąd: Sosnowiec

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


Miałem taki CSS
  1. input {
  2. background-image: url(../images/form/normal.png);
  3. width: 57px;
  4. height: 14px;
  5. }
  6.  
  7. input:hover {
  8. background-image: url(../images/form/normal_hover.png);
  9. }


Lecz zaczołem potrzebować wykorzystać class w inputach no i pojawił się błąd:
gdy najadę na <input class="long"> powinno zmienić tło inputa na ../images/form/small_hover.png. Plik na pewno istnieje i jest grafiką (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif) Może ktos wie jak to zrobić ba do tego js nie mam ochoty stosować.

obecny css
  1. input {
  2. background-image: url(../images/form/normal.png);
  3. width: 57px;
  4. height: 14px;
  5. }
  6.  
  7. input:hover {
  8. background-image: url(../images/form/normal_hover.png);
  9. }
  10.  
  11. input.long {
  12. background-image: url(../images/form/long.png);
  13. width: 96px;
  14. }
  15.  
  16. input.long:hover {
  17. background-image: url(../images/form/small_hover.png);
  18. }
  19.  
  20. input.smal {
  21. background-image: url(../images/form/small.png);
  22. width: 41px;
  23. }
  24.  
  25. input.smal:hover {
  26. background-image: url(../images/form/small_hover.png);
  27. }


Lecz niestety nie działa

(jest to tylko fragmęt odpowiedzialny za inputy)

Ten post edytował Landon 31.05.2008, 19:06:32
Go to the top of the page
+Quote Post
koderrr
post
Post #2





Grupa: Zarejestrowani
Postów: 255
Pomógł: 16
Dołączył: 4.07.2007

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


w ie nie dziala efekt hover dla niczego innego niz a
Go to the top of the page
+Quote Post
devnul
post
Post #3





Grupa: Zarejestrowani
Postów: 1 470
Pomógł: 75
Dołączył: 21.09.2005
Skąd: że znowu

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


jeśli problemem nie jest wspomniane IE to może spróbuj dać !important przy stylach inputów z nadanymi klasami
Go to the top of the page
+Quote Post
pitbull82
post
Post #4





Grupa: Zarejestrowani
Postów: 167
Pomógł: 0
Dołączył: 30.04.2004
Skąd: Częstochowa

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


Dla IE trzeba dorzucić trochę JS: http://htmldog.com/articles/suckerfish/hover/
Go to the top of the page
+Quote Post
Landon
post
Post #5





Grupa: Zarejestrowani
Postów: 83
Pomógł: 3
Dołączył: 21.04.2007
Skąd: Sosnowiec

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


poradziłem sobie. no i w ie 7 łazi ładnie (IMG:http://forum.php.pl/style_emoticons/default/tongue.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: 22.08.2025 - 17:54