Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Bootstrap 4 Basics (Retired) Responsive Layouts with the Bootstrap Grid Column Sizing

James Coles
James Coles
2,449 Points

Linking my own Stylesheets

Can i use two different classes for one element?

If i want to use Bootstrap but use my own style sheets for font or colour, how do i do this?

1 Answer

evannex
evannex
2,436 Points

Yes, you can technically use as many classes as you want for a single element. Just remember that ids are not the same, there can be only one. Also try to keep things consistent and only use extra classes when needed.

You would link your external style sheet below the link to the bootstrap style sheet. This makes sure that your styles are the last ones the browser sees. Then you would just select and style elements as normal within your custom style sheet.