Ken W
Ken W

Reputation: 962

CSS: font-family in body doesn't apply to content

I'm using google font api, this code works when I move the font-family line into encapsulated classes and ids, Why is it that I have to move my font-family line into .banner for it to affect text inside my banner class

css:

body{
    font-family: 'Crimson Text';
    font-size: 15px;
    margin: 0px;


    .banner {
        otherstuff
    }

}

html.erb:

<div class="banner">
    <%= image_tag("logo.png")%>
    <div class="login_menu_bar">
        <label>login</label>
        <label>password</label>
        </br>
        yeah
    </div>
</div>

Upvotes: 2

Views: 12331

Answers (2)

Oswaldo Acauan
Oswaldo Acauan

Reputation: 2740

it works fine http://jsfiddle.net/QCYVs/

Upvotes: 0

Edwin Bautista
Edwin Bautista

Reputation: 364

Isn't the CSS above should be something like this?

body{
    font-family: 'Crimson Text';
    font-size: 15px;
    margin: 0px;
}

.banner {
    otherstuff
}

Upvotes: 2

Related Questions