Grow your CSS skills. Land your dream job.

Multiple Header Anchor Tags?

  • # January 6, 2013 at 9:20 pm

    ‘Allo everyone. I have an issue. I want to take this and make it so each word in the menu is a separate color. I currently have an anchor tag:

    a {
    font-size: 1em;
    outline: none;
    text-decoration: none;
    color: #00AEEF;
    }

    And it is what is creating the cyan blue. How do I divide each menu item up and apply a different color to each one? Here is the HTML code generating the menu:

    Thank you in advance!

    Edit: Sorry about the glitch with the menu-bar div. I apparently have to click “Code” twice for it to appear as code for all of you to see.

    # January 6, 2013 at 10:17 pm

    Use the classes that you already have on the list items. So for example:

    ~~~
    .home a {
    color: red;
    }
    .literature a {
    color: blue;
    }

    ~~~

    # January 7, 2013 at 11:33 am

    The @joshuanhibbert example should work just fine.
    Just use the classes of the list itens on your css adding the anchor selector after as said by @joshuanhibbert and put the color that you want, the common properties as font-size, font-family and so on you can place on the `#mt-main-nav a` selector.

    # January 7, 2013 at 12:35 pm

    Thank you, both of you. Once I can figure out what is going on with my WampServer, I shall apply these changes.

    # January 7, 2013 at 12:51 pm

    @mintertweed I had problems this morning with Wamp. Turned out that I deleted the “testmysql.php” file. Another common issue is Skype running while starting Wamp.

    # January 7, 2013 at 1:42 pm

    @chrisburton, yep, I was running Skype. Sigh.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".