Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Link colours differ from calcualted value

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #259248
    Vironic
    Participant

    Some links changed colours, but as i looked it up with firefoxtool and firebug the calculated value was another colour.
    http://imgur.com/a/Q4VJK
    The Example for 2 links is here
    https://codepen.io/Vironic/pen/xLYEpE
    Both links have the same styles.
    I pasted only the “active”/”used” Styles shown in firebug to codepen.
    So Firebug/Firefox tell me the colour is #ee7100/rgb(238, 113, 0) where it is obviously not for the “Registrieren” link. The other link is fine. This is just an example and happened in another menue too.
    http://imgur.com/a/gMrAX
    So i tryed removing the colour styles for the links. And what happened is this.
    http://imgur.com/a/lInxH
    So the correct link changed colours to default and the corrupted link stayed that way.
    So does anyone have an idea?
    Help very much appreciated
    Thank you

    #259274
    emmzee
    Participant

    When you use a:link in CSS, it changes the color for the link if it’s not previously been visited.

    To make sure the color stays consistent, you need to also use a:visited, a:focus, and a:active. So add “a:visited {…}” and set the color there also.

    See here for the correct order:
    https://css-tricks.com/snippets/css/link-pseudo-classes-in-order/

    #259313
    Vironic
    Participant

    Oh sorry forgot to post other styles.

    Oh yes sorry, forgot to post the styles.
    a:link{
    text-decoration: none;
    color: #ee7100;

    }
    a:visited {
    border-bottom: solid 2px #ee7100 ;
    color: #ee7100;

    }
    a:active{
    border-bottom: solid 2px #ee7100 ;

    }
    a:link:hover,
    a:visited:hover,
    a:link:focus,
    a:visited:focus,
    a:link:active,
    a:visited:active
    {
    border-bottom: solid 2px #ee7100 ;

    }

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design’ is closed to new topics and replies.