Cufon - problem z Hover oraz Current

Wszystko o HTML, XHTML, XML, CSS.
Mega_88
Posty: 6
Rejestracja: 02 wrz 2011, 21:47:42
Płeć: Niewybrana
User Agent: Opera Windows 1920x1080

Cufon - problem z Hover oraz Current

Post autor: Mega_88 »

Witam !
Mam problem z, którym męcze się już od dwóch dni. Nie mam pojęcia gdzie mam błąd i czemu nie działa mi to tak jak powinno.
Problem jest w menu strony, która zrobiłem i zostało mi tylko to. Menu zrobione jest z uzyciem Cufon, ale nie wiem czy ma to jakieś znaczenie i po tej stronie lezy problem.
Funkcja Hover działa tak jak powinna, ale potrzebuje zrobić jeszcze funkcje Current, która będzie mi odznaczała aktywną zakładkę na której sie właśnie znajduje.
Może mi ktoś z tym pomóc ? Będe bardzo wdzięczny. Kod poniżej.
**Na stronie:**
<?php
if ($id==7 or $id==8 or $id==9) echo
'<div class="menu1">
<a href="start" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="historia" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="srebrna" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="zlota" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="brazowa" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="kontakt" class="current" style="margin-right:0px"><h3>Start</h3></a>
</div>'
?>

**CSS**

.menu1 { float:right; width:720px;height:10px;margin-top:100px;}
.menu1 a, .menu1 span { display:block;float:left;margin-left:5px }
.menu1 a { color:#ffffff;font-size:12px;}
.menu1 a:hover { color:#bb9e55;font-size:12px;padding-bottom:10px;}
.menu1 a:current { color:#bb9e55;font-size:12px;padding-bottom:10px;}
.menu1 span { color:#bb9e55;font-size:12px;}

**JS do Cufon**

Cufon.replace("h3", { hover: {color: '#bb9e55'} });
Venite
Obsługa CBA
Posty: 3197
Rejestracja: 18 lut 2011, 08:01:57
Lokalizacja: Kędzierzyn-Koźle
Płeć: Mężczyzna
User Agent: Internet Explorer Windows 1440x900

Re: Cufon - problem z Hover oraz Current

Post autor: Venite »

Kod: Zaznacz cały

<a href="start" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="historia" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="srebrna" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="zlota" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="brazowa" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="kontakt" class="current" style="margin-right:0px"><h3>Start</h3></a>
 </div>'
Klasę "current" powinien mieć tylko jeden link, ten, na którym akurat się znajdujesz. Nadanie atrybutu "current" wszystkim, nieco mija się z celem ;]
Czy wiesz, że:
  • W Panelu CBA w sekcji "wsparcie" jest dedykowany system ticketów (obsługi technicznej)
  • Odpowiadamy na Forum oraz na adres mailowy obsluga(malpa)cba.pl
  • Jesteśmy również na Facebooku! Znajdź nas na facebook.com/hostingcba | cba.pl
W czym jeszcze możemy pomóc?
Mega_88
Posty: 6
Rejestracja: 02 wrz 2011, 21:47:42
Płeć: Niewybrana
User Agent: Opera Windows 1920x1080

Re: Cufon - problem z Hover oraz Current

Post autor: Mega_88 »

Jak mam to zrobić skoro wszystko ładuje się w pliku index.php, a zakładki odwołują się do pliku .htaccess ?
Jak nadać tylko klasę to obecnie odwiedzanego linku ? Bo troche nie rozumiem ...
Venite
Obsługa CBA
Posty: 3197
Rejestracja: 18 lut 2011, 08:01:57
Lokalizacja: Kędzierzyn-Koźle
Płeć: Mężczyzna
User Agent: Firefox Windows 1440x900

Re: Cufon - problem z Hover oraz Current

Post autor: Venite »

Kod: Zaznacz cały

<div class="menu1">
<a href="start" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="historia" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="srebrna" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="zlota" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="brazowa" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="kontakt" class="current" style="margin-right:0px"><h3>Start</h3></a>
</div>'
Jeśli jesteś na I stronie "start" z href "start", będzie to wyglądało tak:

Kod: Zaznacz cały

<div class="menu1">
<a href="start" class="current" style="margin-right:10px"><h3>Start</h3></a>
<a href="historia" style="margin-right:10px"><h3>Start</h3></a>
<a href="srebrna" style="margin-right:10px"><h3>Start</h3></a>
<a href="zlota" style="margin-right:10px"><h3>Start</h3></a>
<a href="brazowa" style="margin-right:10px"><h3>Start</h3></a>
<a href="kontakt" style="margin-right:0px"><h3>Start</h3></a>
</div>'
Jak mam to zrobić skoro wszystko ładuje się w pliku index.php
Musisz poszukać, w którym miejscu kodu jest to przetwarzane. Masz skrypt autorski czy jeden z ogólnodostępnych?
Wartałoby też podać jego nazwę lub kod generujący.
Czy wiesz, że:
  • W Panelu CBA w sekcji "wsparcie" jest dedykowany system ticketów (obsługi technicznej)
  • Odpowiadamy na Forum oraz na adres mailowy obsluga(malpa)cba.pl
  • Jesteśmy również na Facebooku! Znajdź nas na facebook.com/hostingcba | cba.pl
W czym jeszcze możemy pomóc?
ODPOWIEDZ