1

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.

1
  • The li should inherit those parent styles if there aren't other styles on it. So inspect the li element and see what styles is it using (maybe you put some bootstrap's styles on them). Commented Nov 6, 2015 at 8:19

1 Answer 1

1

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!

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

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.