0

Can you help me to set the text color of the class slide anchors? Here in http://jsfiddle.net/x7zpd/ is my problem shown.

<div id="menu-demo">

        <ul>
            <li>
                <div class="up">
                    <a href="#">INICIO</a></div>
                <div class="slide">
                    <a href="#">INICIO</a></div>
            </li>


#menu-demo li a {
    text-decoration:none;
    color:#aaa;
    font-size:20px;
    font-family:Tahoma, Geneva, sans-serif;    
}
.up {
    margin-top:13px;
    margin-bottom:40px;
}
 .slide
{
    background-color: #ffc; /* delete me */
    color: black;
}

2 Answers 2

1

Here you go.

#menu-demo li .slide a { background-color: #ffc; /* delete me */ color: black; }

... otherwise the normal a will have priority, since it's more internal and IDs + hierarchy have priority on classes.

Sign up to request clarification or add additional context in comments.

Comments

0

The anchor tag has a color assigned to it as well that overrides the color of the parent container. You also need a .slide A{color:#000;} in there as well.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.