Skip to main content
Inspiring
Nov 30, 2020 5:47 PM UTC
Answered

CSS won't let me add a:link... says css is invalid?

I've created a new class for the footer and want to change the link colors but when I try, it says my a:link etc are invalid CSS.  What am I missing?  Is this a bug?  It seems to me that adding, editing css is not as easy as it was. 

I have selected hyperlinked text in the footer area to try and modify the colors. 

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Jon Fritz
    Jon FritzCorrect answer
    Community Expert
    Nov 30, 2020 6:36 PM UTC

    You would create the a:link under Selectors, not Properties.

    If you only want to select links in your footer, the Selector would be something like...

    .yourfooterclass a:link

    ...you would then add Properties like color, margin, text-decoration, etc after creating the Selector.

    3 replies

    Nancy OShea
    Community Expert
    Community Expert
    Nov 30, 2020 6:41 PM UTC

    Maybe because a:link is a CSS pseudo -class that will effect ALL anchors on your page regardless of where they appear.  If you want to style just the footer links, try footer a instead.  Or do what I do and manually edit code in your stylesheet thus avoiding panel hassles entirely.

     

    Translate
    Nancy O'Shea— Product User & Community Expert
    jefferisAuthor
    Inspiring
    Nov 30, 2020 9:52 PM UTC

    Thanks all. I ended up doing it manually, but there is a big change from DW CS 6 to 2021 in how the panels work. 

     

    I see the selector does what I want though. 

    Translate
    Jon Fritz
    Community Expert
    Jon FritzCommunity ExpertCorrect answer
    Community Expert
    Nov 30, 2020 6:36 PM UTC

    You would create the a:link under Selectors, not Properties.

    If you only want to select links in your footer, the Selector would be something like...

    .yourfooterclass a:link

    ...you would then add Properties like color, margin, text-decoration, etc after creating the Selector.

    Translate