Bootstrap is a great way to jumpstart a new project. But at some point, you’re going to want to add your own styling to set it apart. There’s two ways of doing this: styling inline and in css stylesheets. Inline styles are useful for adding css for a single element. Here’s an example of adding inline style with the style
attribute.
However, what if we had multiple elements that we wanted to add style to? Well we can add our styling in a css stylesheet. In rails, this will usually mean adding it to our ‘application.scss’ file (or in the automatically created stylesheets for rails resources). This file is located in the asset/stylesheets folder. That also means that it will be automatically loaded by our rails app. We can add the same line of code in our stylesheet
And then in our html all we need to do is add our newly created css class to the element
Happy coding!