Basic CSS trouble

Posted by user310108 on Stack Overflow See other posts from Stack Overflow or by user310108
Published on 2010-04-06T14:27:40Z Indexed on 2010/04/06 14:33 UTC
Read the original article Hit count: 158

Filed under:

I guess this is fairly simple for you but i cant wrap my head around it. I ripped out the important part. I got text inside #content so i cant change it and i dont want to use !important tag. The css is presented in the order it is placed in my css file.

How come the "#content h2 a, #content h2 a:visited" overrides the .post-header h2 a?

<html>
    <head>
    .....
    </head>
    <div id="content">
    .....
        <div class="post-header">
            <a href="#">my text</a>
        </div>
    </div>
</html>


#content h2 a, #content h2 a:visited {
    font-family:"arial black","lucida console",sans-serif;
}

.post-header h2 a {
    font-family:Arial,sans-serif;
}

/Joel

© Stack Overflow or respective owner

Related posts about css