Verwendung: Links in Hauptspalte anpassen

Reinhard's Avatar

Reinhard

Nov 03, 2024 @ 12:45 AM

Produkt: Tao Contao
Contao-Version: 5.3. LTS

Lässt sich der <a> Tag so anpassen, dass nur in der Hauptspalte (main-content) der Tag mittels custom.css verändert wird, so dass z.B. Farbe und text-decoration festgelegt werden kann:
a { color: #1782c5;
text-decoration: underline;
}
Irgendwie schaffe ich es nicht den <a>-Tag mit dem main-content zu verbinden.

  1. Support Staff 1 Posted by RockSolid Theme... on Nov 04, 2024 @ 09:08 AM

    RockSolid Themes's Avatar

    Vielen Dank für Ihre Frage.

    Um nur die Links in der Hauptspalte anzusprechen, können Sie folgenden CSS-Code verwenden:

    .main-content a { 
        color: #1782c5;
        text-decoration: underline;
    }
    
  2. 2 Posted by Reinhard on Nov 04, 2024 @ 09:12 PM

    Reinhard's Avatar

    Perfekt, besten Dank. Ich musste noch in der Hauptspalte vorhandene und verlinkte icon-boxes auf text-decoration: none zurückstellen, da sonst der Text in einer verlinkten Box unterstrichen wird. Hat aber alles geklappt.
    Nur die Artikel anzusprechen habe ich nichts passendes wie z.B. .articles gefunden

Reply to this discussion

Internal reply

        No formatting (switch to Markdown)

          You can attach files up to 10MB

          If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

            Keyboard shortcuts

            Generic

            ? Show this help
            ESC Blurs the current field

            Comment Form

            r Focus the comment reply box
            ^ + ↩ Submit the comment

            You can use Command ⌘ instead of Control ^ on Mac