sIFR 3 - Selector für Links

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • sIFR 3 - Selector für Links

    [FONT=Arial]Hallo,[/FONT]

    [FONT=Arial]Ich hoffe dass ich im Off-Topic richtig bin, sIFR passt ja auch nicht wirklich mehr in den Javascript Bereich.[/FONT]
    [FONT=Arial]Ich habe folgenden HTML Code[/FONT]

    [FONT=Arial]
    HTML-Code:
    <div id=“box“>
         <p class=“normal“>Text <a href=““ class=“grey“>Link</a></p>
    </div>
    [/FONT]
    [FONT=Arial]Dabei habe ich eine Background- und Schriftfarbeinstellung in der sIRF Konfigurationsdatei definiert, allerdings möchte ich dabei für den Link eine andere Farbe verwenden, als für den normalen Text.[/FONT]
    [FONT=Arial]Die sIRF Dokumentation sagt folgende Selektoren sind erlaubt ([/FONT]Selectors in sIFR 3 Documentation & FAQ)[FONT=Arial]:[/FONT]

    1. [FONT=Arial]h1[/FONT]
    2. [FONT=Arial]h1 > em[/FONT]
    3. [FONT=Arial]h1 em[/FONT]
    4. [FONT=Arial].foo[/FONT]
    5. [FONT=Arial]h1.foo[/FONT]
    6. [FONT=Arial]#bar[/FONT]
    7. [FONT=Arial]h1#bar[/FONT]
    8. [FONT=Arial]h1#bar.foo[/FONT]
    9. [FONT=Arial]#bar.foo[/FONT]
    10. [FONT=Arial].foo.baz[/FONT]

    Und fügt folgendes hinzu (Selectors in sIFR 3 Documentation & FAQ):

    If you want to use a general selector and more specific ones, [FONT=&quot]make sure the most specific one is replaced first[/FONT]. i.e. 'h1.foo' is higher on the page than 'h1'
    Meine Konfiguration sieht so aus, die Schriftfarbe bleibt allerdings weiß!

    HTML-Code:
    sIFR.replace(font, {
      selector: '.grey.normal',
      css: '.sIFR-root { color: #cccccc; }'
    });
    sIFR.replace(font, {
      selector: '.normal',
      css: '.sIFR-root { background-color: #000000; color: #ffffff; }'
    });
    Edit:

    Geändert von ranopalepu (02-04-2010 um 14:06 Uhr)
    Ich glaube eure Zeiteinstellungen sind nicht mehr ganz korrekt!


    Zuletzt geändert von ranopalepu; 03.04.2010, 21:09.

  • #2
    Habe eine Lösung gefunden, da hatte ich wirklich ein Brett vor meinem Kopf:

    HTML-Code:
    sIFR.replace(font, {
      selector: '.normal',
      css: '.sIFR-root { background-color: #000000; color: #ffffff; } a { color: #cccccc; }'
    });

    Kommentar


    • #3
      Zitat von ranopalepu Beitrag anzeigen
      Ich glaube eure Zeiteinstellungen sind nicht mehr ganz korrekt!
      Die Zeitzone kannst du unter "Kontrollzentrum -> Einstellungen ändern" einstellen.

      Kommentar

      Lädt...
      X