Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

A Href Color Editing in HTML

Options
  • 09-10-2012 11:01pm
    #1
    Closed Accounts Posts: 1,109 ✭✭✭


    I can't for the life of me remember to or find out how to edit the color of an a href link.

    I've tried doing it under a #container within a CSS file, but doesn't seem to be working. Due to the assignment I'm working on, internal styling within html files is forbidden. So I'm stuck trying to edit them through the CSS file.

    I've been searching the Webschools site on Html and CSS but can't seem to find an answer. Any help ?


Comments

  • Registered Users Posts: 1,695 ✭✭✭Media999


    I think its :

    a.link{

    styling here

    }

    Just learning myself actually.

    edit
    A:link
    Defines the style for normal unvisited links.

    A:visited
    Defines the style for visited links.

    A:active
    Defines the style for active links.
    A link becomes active once you click on it.

    A:hover
    Defines the style for hovered links.


  • Registered Users Posts: 1,266 ✭✭✭Overflow


    MaxSteele wrote: »
    I've been searching the Webschools site on Html and CSS but can't seem to find an answer. Any help ?

    Seriously ? Its all right there:

    http://www.w3schools.com/css/css_link.asp


  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    Media999 wrote: »
    I think its :

    a.link{

    styling here

    }

    Just learning myself actually.

    edit

    Nope, just a {color:#rrggbb;}

    .link is a class and the :link, :visited etc are pseudo selectors.

    OP also use FireBug or some other dev tool to inspect elements for their properties.


  • Registered Users Posts: 1,695 ✭✭✭Media999


    tricky D wrote: »
    Nope, just a {color:#rrggbb;}

    .link is a class and the :link, :visited etc are pseudo selectors.

    OP also use FireBug or some other dev tool to inspect elements for their properties.

    Same as this yeah?

    a {

    color:#rrggbb;

    }

    because its a href not just href .


  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    Same. Some of us declare on a single line:eek:
    Not sure what you're getting at re a href. href isn't a css selector.


  • Advertisement
  • Registered Users Posts: 1,695 ✭✭✭Media999


    tricky D wrote: »
    Same. Some of us declare on a single line:eek:
    Not sure what you're getting at re a href. href isn't a css selector.

    That was aimed at OP. I get the impression he was mixing up href with a.

    <href instead of <a href

    maybe. Im not sure.


  • Closed Accounts Posts: 1,109 ✭✭✭MaxSteele


    Overflow wrote: »
    Seriously ? Its all right there:

    http://www.w3schools.com/css/css_link.asp

    I know i was looking at that, but the href is just confusing me.

    Here's basically what I'm trying to do at the moment.

    HTML file:

    <div id="Navigation">

    <a href="index.html">Home</a>

    CSS file:

    #Navigation
    {
    font-style: #8B0000;
    font-family:"Helvetica";
    color: #33CC33;}

    color won't change though. If I have to do it within the html I will.


  • Closed Accounts Posts: 1,109 ✭✭✭MaxSteele


    tricky D wrote: »
    Nope, just a {color:#rrggbb;}

    .link is a class and the :link, :visited etc are pseudo selectors.

    OP also use FireBug or some other dev tool to inspect elements for their properties.

    Sound Mod, worked a charm :)


  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    MaxSteele wrote: »
    I know i was looking at that, but the href is just confusing me.

    Here's basically what I'm trying to do at the moment.

    HTML file:

    <div id="Navigation">

    <a href="index.html">Home</a>

    CSS file:

    #Navigation
    {
    font-style: #8B0000;
    font-family:"Helvetica";
    color: #33CC33;}

    color won't change though. If I have to do it within the html I will.

    Read the w3schools link and a few other of those css pages.

    You shouldn't need to do it within html if you get the css right.

    #Navigation a
    {
    font-style: #8B0000;
    font-family:"Helvetica";
    color: #33CC33;}

    is what you want.

    or for all links, just:

    a
    {
    font-style: #8B0000;
    font-family:"Helvetica";
    color: #33CC33;}


Advertisement