Utilizing Bootstraps already present in your code simplifies the process, making it easier to stick with them rather than crafting custom CSS if it is unnecessary. Upon inspecting the source code of the provided link, you can identify various classes impacting the spacing and dimensions of elements within your page.
Adjusting Margins and Padding
- The
py-5
class introduces padding to the top and bottom of each element it is assigned to, resulting in whitespace.
- The
pt-5
class adds padding exclusively to the tops of elements.
- The
my-5
class incorporates margins before and after elements.
- Nested elements may contain a
mb-#
class as well, contributing additional bottom margin space that could potentially be reduced.
To modify these classes and minimize margin and padding sizes, consider replacing my-5
with my-2
for decreased margin or my-0
for complete removal of margin.
For further insight, refer to the documentation linked by @AStombaugh in response to your inquiry, which delves into Bootstrap Spacing.
Font Size Alterations
A comparable process can be applied when decreasing font sizes. By observing the presence of the display-5
class in your code, referencing Bootstrap's Typography documentation serves as a beneficial starting point.
Additionally, exploring the details provided in the Text section may aid in adjusting font sizes and line heights effectively.