Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [css] button
pro-mil
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 28.08.2006

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


Chcę przy wykorzystaniu diva i css (bez javascript i czegość w stylu this.className) zrobić sobie buttonik. Po najechaniu zmienia się tło, ramka, czcionka. No i właśnie mi nie wychodzi smile.gif

Przykładowe buttony: (mają być obok siebie)
  1. <div class="ansbutton"><a href="page1">Tak</a></div>
  2. <div class="ansbutton"><a href="ipage2">Nie</a></div>


no i niebardzo wychodzi mi css:

  1. .ansbutton {
  2. display: inline;
  3. border: 1px solid #a3a3a3;
  4. padding: 0 10px 0 20px;
  5. background: #DCDCDC url(img/arr3.gif) repeat-y;
  6. margin-right: 10px;
  7. text-align: center;
  8. font-family: Helvetica, "Arial CE", Tahoma, Georgia;
  9. font-size : 8pt;
  10. color : #4e4e4e;
  11. text-decoration : none;
  12. }


w tym wypadku czcionka 'TAK' i 'NIE' nie jest brana z .ansbutton tylko z wcześniejszej definicji a {} a tego nie chcę.

nie wiem jak zrobić coś w stylu onmouseover w css.

Kombinowałem tak:
  1. .ansbutton a:hover{
  2. display: inline;
  3. border: 1px solid #808080;
  4. padding: 0 10px 0 20px;
  5. background: #d4d4d4 url(img/arr3.gif) repeat-y;
  6. margin-right: 10px;
  7. text-align: center;
  8. font-family: Helvetica, "Arial CE", Tahoma, Georgia;
  9. font-size : 8pt;
  10. color : #bf4128;
  11. text-decoration : none;
  12. }


ale to nie zmienia mi wyglądu diva tylko czcionki co wydaje mi się logiczne smile.gif ale tego nie chcę.

Kombinowałem i tak:

  1. .ansbutton a {
  2. display: inline;
  3. border: 1px solid #a3a3a3;
  4. padding: 0 10px 0 20px;
  5. background: #DCDCDC url(img/arr3.gif) repeat-y;
  6. margin-right: 10px;
  7. text-align: center;
  8. font-family: Helvetica, "Arial CE", Tahoma, Georgia;
  9. font-size : 8pt;
  10. color : #4e4e4e;
  11. text-decoration : none;
  12. }
  13.  
  14. .ansbutton a:hover{
  15. display: inline;
  16. border: 1px solid #808080;
  17. padding: 0 10px 0 20px;
  18. background: #d4d4d4 url(img/arr3.gif) repeat-y;
  19. margin-right: 10px;
  20. text-align: center;
  21. font-family: Helvetica, "Arial CE", Tahoma, Georgia;
  22. font-size : 8pt;
  23. color : #bf4128;
  24. text-decoration : none;
  25. }


no prawie prawie ale display: inline; nie jest brane pod uwagę tak jak i width i height, co także chyba rozumiem smile.gif.

Uff no nie mam pojecia jak zrobić ten 'kwadracik'. Pomocy smile.gif

Pozdrawiam
pss. sorki za ew herezje ale css to narazie nie moja mocna strona. Szukałem na googlach ale tam same opisy buttonów zrobionych za pomocą input - tego też nie chcę smile.gif
Go to the top of the page
+Quote Post

Posty w temacie


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 Aktualny czas: 21.08.2025 - 17:18