While using Bootstrap, a developer needs to override default styles for specific components. What is the best practice for doing this without affecting global styles?
- Apply inline styles directly to HTML elements
- Modify the default Bootstrap stylesheet directly
- Use custom classes to override styles
- Use the !important declaration sparingly
Using custom classes to override styles is the recommended approach as it keeps the changes modular and doesn't impact other parts of the application.
Loading...
Related Quiz
- You're tasked with creating a spinner loader animation that rotates 360 degrees indefinitely. How would you define this in the @keyframes rule?
- What does the text-transform property do in CSS?
- How does the column-span property in CSS affect an element in a multi-column layout?
- When designing a multi-language website, you need to choose fonts that support a wide range of characters and scripts. What factors should you consider while selecting these fonts?
- You need to style a button differently when it's disabled. Which CSS pseudo-class would be most appropriate to achieve this?