Link to home
Start Free TrialLog in
Avatar of Peter Kroman
Peter KromanFlag for Denmark

asked on

Overwriting Bootstrap link styling

Hi,

I have a page where I need to use this bootstrap stylesheet
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">

Open in new window


I have also my own stylesheet which is loaded after the boostrap stylesheet.

In my own stylesheet I have set these stylings for links, but the only one that seems to have any effect is the hover. How do I make the other ones overwrite the default bootstrap styling.
    /* unvisited link */
    a:link {
        color: blue;
        text-decoration: none;
    }

    /* visited link */
    a:visited {
        color: blue ;
    }

    /* mouse over link */
    a:hover {
        color: red;
        text-decoration: underline;
    }

    /* selected link */
    a:active {
        color: blue;
        text-decoration: none;
    } 

Open in new window

Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Hey Peter,

There's nothing wrong with your CSS, so something else must be going on in your page. Post a link to it and we'll take a look
ASKER CERTIFIED SOLUTION
Avatar of Peter Kroman
Peter Kroman
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yep - that seems to do the trick :)
Avatar of Peter Kroman

ASKER

It works