Mel
Mel

Reputation: 2685

Nested CSS - Bootstrap/rails

I have this CSS style in my Rails 4 app (with bootstrap)

.intpol3 {
    font-family: 'Roboto', sans-serif;
    color: black;
    font-size: 16px;
    text-align:left;
    letter-spacing:2px; 
    line-height: 1.5;       
}

When I use this div class, I have text that includes a bulleted list, which is set with the <li> tag.

Is there a way to use the <li> tag so that where it is used inside the above CSS div tag, it uses the styling of the div tag? At the moment it defaults to some ugly text and I can't find the source of it. I only want to override it for the specific list items inside this div tag - as I use list items elsewhere and the ugly text is fine for those.

Upvotes: 1

Views: 84

Answers (1)

Djwokian
Djwokian

Reputation: 249

Pop in

.intpol3 li {
.........
}

Sass/scss makes writing these kind of relationships even easier / maintainable and no changes are needed for scss to work in rails.

Good luck!

Upvotes: 1

Related Questions